From fb17b2b6aaf04afdd09b999ef0ea9725e8a99736 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 10 May 2015 09:21:37 +0000 Subject: [PATCH] Update to kbproto 1.0.7 --- proto/kbproto/ChangeLog | 102 ++++++++++ proto/kbproto/INSTALL | 119 ++++++++++-- proto/kbproto/XKBgeom.h | 5 + proto/kbproto/XKBstr.h | 43 ++++- proto/kbproto/compile | 347 +++++++++++++++++++++++++++++++++++ proto/kbproto/configure.ac | 6 +- proto/kbproto/specs/appD.xml | 2 +- 7 files changed, 593 insertions(+), 31 deletions(-) create mode 100644 proto/kbproto/compile diff --git a/proto/kbproto/ChangeLog b/proto/kbproto/ChangeLog index ef83f64a7..7870c6131 100644 --- a/proto/kbproto/ChangeLog +++ b/proto/kbproto/ChangeLog @@ -1,3 +1,105 @@ +commit ec54606682aa395517bde1e01dd9bb8a1033e707 +Author: Alan Coopersmith +Date: Thu Apr 30 22:43:41 2015 -0700 + + kbproto 1.0.7 + + Signed-off-by: Alan Coopersmith + +commit fe38312ff65b87a03d21ac5d10618080da296145 +Author: wettstae@gmail.com +Date: Mon Mar 9 20:13:21 2015 +0100 + + kbproto: Fix typo in XkbSARedirectSetVMods + + An apparent copy/paste bug in the macro XkbSARedirectSetVMods, which breaks + using RedirectKey actions with virtual modifiers. + + Signed-off-by: Andreas Wettstein + Reviewed-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 5e40da736ffc87f5cafaaa67d745e20ef67a9f4a +Author: Gaetan Nadon +Date: Sat Oct 26 09:42:05 2013 -0400 + + config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES + + Fix Automake warning: AC_OUTPUT should be used without arguments. + www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files + + Signed-off-by: Gaetan Nadon + +commit 7cc231b806b1cf6c0c7a71efe335efad892860f0 +Author: Alan Coopersmith +Date: Fri Aug 16 22:00:18 2013 -0700 + + Drop WORD64 (Cray) support + + Signed-off-by: Alan Coopersmith + +commit 95ee49d90c28b15a3c3be54a233368fc69f3531a +Author: Alan Coopersmith +Date: Fri Aug 16 21:55:27 2013 -0700 + + Add comments about sizes of dynamically allocated arrays + + Many arrays have sz_* or size_* fields to list the number of entries + allocated, and num_* fields to record the number of entries used. + + Others use num_* for the number allocated, or size based on max_key_code. + + And a few are just plain trying to mess with your head. (I'm looking at + you XkbNamesRec & XkbKeyTypeRec.) + + It sure would have been nice if all the XKB authors could have picked + a single convention and stuck to it, but we're 20 years too late for + that now, so just document it so I can stop reverse engineering from + the code every time I need to see if we got a bounds check right or not. + + Signed-off-by: Alan Coopersmith + +commit db07706cb268d5fe1bc38ef5c0a9f49309068b2c +Author: Daniel Martin +Date: Sun Jul 28 21:25:33 2013 +0200 + + specs: Change XkbSA_DfltBtnAbsolute to 4 + + Adopt the value from XKB.h: + #define XkbSA_DfltBtnAbsolute (1L << 2) + + Found-by: Ran Benita + Signed-off-by: Daniel Martin + Signed-off-by: Peter Hutterer + +commit a404bec53f6fff71fc7d47f41eca2ef488d16937 +Author: Alan Coopersmith +Date: Sat Mar 2 10:43:45 2013 -0800 + + Tell clang not to report -Wpadded warnings on public headers we can't fix + + Better to silence the compiler warning than break ABI. + + Signed-off-by: Alan Coopersmith + +commit f7022f5775350dce3348b7151845a32390e98791 +Author: Colin Walters +Date: Wed Jan 4 17:37:06 2012 -0500 + + autogen.sh: Implement GNOME Build API + + http://people.gnome.org/~walters/docs/build-api.txt + + Signed-off-by: Adam Jackson + +commit 50828064b114a26d35b5b75d45068755d0d260c3 +Author: Adam Jackson +Date: Tue Jan 15 14:01:10 2013 -0500 + + configure: Remove AM_MAINTAINER_MODE + + Signed-off-by: Adam Jackson + commit 391a1f6de6315fc0196d407d800597488315cccb Author: Alan Coopersmith Date: Thu Mar 22 20:43:02 2012 -0700 diff --git a/proto/kbproto/INSTALL b/proto/kbproto/INSTALL index 8b82ade08..a1e89e18a 100644 --- a/proto/kbproto/INSTALL +++ b/proto/kbproto/INSTALL @@ -1,11 +1,13 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + 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. This file is offered as-is, +without warranty of any kind. Basic Installation ================== @@ -13,7 +15,11 @@ Basic Installation Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ may remove or edit it. you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ The simplest way to compile this package is: 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. - 5. You can remove the program binaries and object files from the + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,8 +83,15 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options ===================== @@ -93,7 +116,8 @@ same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have @@ -120,7 +144,8 @@ Installation Names By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -131,15 +156,46 @@ Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -152,6 +208,13 @@ find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Particular systems ================== @@ -159,10 +222,15 @@ Particular systems CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: - ./configure CC="cc -Ae" + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended @@ -174,6 +242,16 @@ and if that doesn't work, try ./configure CC="cc -nodtk" + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== @@ -189,7 +267,8 @@ type, such as `sun4', or a canonical name which has the form: where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -277,7 +356,7 @@ operates. `configure' can determine that directory automatically. `--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: + Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. diff --git a/proto/kbproto/XKBgeom.h b/proto/kbproto/XKBgeom.h index f60385296..cef78fa19 100644 --- a/proto/kbproto/XKBgeom.h +++ b/proto/kbproto/XKBgeom.h @@ -95,6 +95,11 @@ typedef struct _XkbBounds { #define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) #define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) +/* + * In the following structs, this pattern is used for dynamically sized arrays: + * foo is an array for which sz_foo entries are allocated & num_foo are used + */ + typedef struct _XkbOutline { unsigned short num_points; unsigned short sz_points; diff --git a/proto/kbproto/XKBstr.h b/proto/kbproto/XKBstr.h index e519e657d..893a04b0b 100644 --- a/proto/kbproto/XKBstr.h +++ b/proto/kbproto/XKBstr.h @@ -31,12 +31,16 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) #define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) - -#if defined(WORD64) && defined(UNSIGNEDBITFIELDS) -#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\ - (int)(((h)<<8)|(l)&0x7fff)) -#else #define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) + +/* + * The Xkb structs are full of implicit padding to properly align members. + * We can't clean that up without breaking ABI, so tell clang not to bother + * complaining about it. + */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" #endif /* @@ -82,9 +86,12 @@ typedef struct _XkbKeyType { XkbModsRec mods; unsigned char num_levels; unsigned char map_count; + /* map is an array of map_count XkbKTMapEntryRec structs */ XkbKTMapEntryPtr map; + /* preserve is an array of map_count XkbModsRec structs */ XkbModsPtr preserve; Atom name; + /* level_names is an array of num_levels Atoms */ Atom * level_names; } XkbKeyTypeRec, *XkbKeyTypePtr; @@ -215,8 +222,8 @@ typedef struct _XkbRedirectKeyAction { #define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ ((unsigned int)(a)->vmods0)) -#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ - ((a)->vmods_mask0=((m)&0xff))) +#define XkbSARedirectSetVMods(a,m) (((a)->vmods1=(((m)>>8)&0xff)),\ + ((a)->vmods0=((m)&0xff))) #define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ ((unsigned int)(a)->vmods_mask0)) #define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ @@ -288,10 +295,14 @@ typedef struct _XkbControls { #define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) typedef struct _XkbServerMapRec { + /* acts is an array of XkbActions structs, with size_acts entries + allocated, and num_acts entries used. */ unsigned short num_acts; unsigned short size_acts; XkbAction *acts; + /* behaviors, key_acts, explicit, & vmodmap are all arrays with + (xkb->max_key_code + 1) entries allocated for each. */ XkbBehavior *behaviors; unsigned short *key_acts; #if defined(__cplusplus) || defined(c_plusplus) @@ -318,15 +329,20 @@ typedef struct _XkbSymMapRec { } XkbSymMapRec, *XkbSymMapPtr; typedef struct _XkbClientMapRec { + /* types is an array of XkbKeyTypeRec structs, with size_types entries + allocated, and num_types entries used. */ unsigned char size_types; unsigned char num_types; XkbKeyTypePtr types; + /* syms is an array of size_syms KeySyms, in which num_syms are used */ unsigned short size_syms; unsigned short num_syms; KeySym *syms; + /* key_sym_map is an array of (max_key_code + 1) XkbSymMapRec structs */ XkbSymMapPtr key_sym_map; + /* modmap is an array of (max_key_code + 1) unsigned chars */ unsigned char *modmap; } XkbClientMapRec, *XkbClientMapPtr; @@ -354,6 +370,8 @@ typedef struct _XkbSymInterpretRec { } XkbSymInterpretRec,*XkbSymInterpretPtr; typedef struct _XkbCompatMapRec { + /* sym_interpret is an array of XkbSymInterpretRec structs, + in which size_si are allocated & num_si are used. */ XkbSymInterpretPtr sym_interpret; XkbModsRec groups[XkbNumKbdGroups]; unsigned short num_si; @@ -403,11 +421,15 @@ typedef struct _XkbNamesRec { Atom vmods[XkbNumVirtualMods]; Atom indicators[XkbNumIndicators]; Atom groups[XkbNumKbdGroups]; + /* keys is an array of (xkb->max_key_code + 1) XkbKeyNameRec entries */ XkbKeyNamePtr keys; + /* key_aliases is an array of num_key_aliases XkbKeyAliasRec entries */ XkbKeyAliasPtr key_aliases; + /* radio_groups is an array of num_rg Atoms */ Atom *radio_groups; Atom phys_symbols; + /* num_keys seems to be unused in libX11 */ unsigned char num_keys; unsigned char num_key_aliases; unsigned short num_rg; @@ -582,6 +604,7 @@ typedef struct _XkbDeviceInfo { unsigned short supported; unsigned short unsupported; + /* btn_acts is an array of num_btn XkbAction entries */ unsigned short num_btns; XkbAction * btn_acts; @@ -589,6 +612,8 @@ typedef struct _XkbDeviceInfo { unsigned short num_leds; unsigned short dflt_kbd_fb; unsigned short dflt_led_fb; + /* leds is an array of XkbDeviceLedInfoRec in which + sz_leds entries are allocated and num_leds entries are used */ XkbDeviceLedInfoPtr leds; } XkbDeviceInfoRec,*XkbDeviceInfoPtr; @@ -610,4 +635,8 @@ typedef struct _XkbDeviceChanges { XkbDeviceLedChangesRec leds; } XkbDeviceChangesRec,*XkbDeviceChangesPtr; +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #endif /* _XKBSTR_H_ */ diff --git a/proto/kbproto/compile b/proto/kbproto/compile new file mode 100644 index 000000000..a85b723c7 --- /dev/null +++ b/proto/kbproto/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/proto/kbproto/configure.ac b/proto/kbproto/configure.ac index f91d01fb3..807f34117 100644 --- a/proto/kbproto/configure.ac +++ b/proto/kbproto/configure.ac @@ -1,8 +1,7 @@ AC_PREREQ([2.60]) -AC_INIT([KBProto], [1.0.6], +AC_INIT([KBProto], [1.0.7], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE # Require xorg-macros minimum of 1.12 for DocBook external references m4_ifndef([XORG_MACROS_VERSION], @@ -15,6 +14,7 @@ XORG_WITH_FOP XORG_WITH_XSLTPROC XORG_CHECK_SGML_DOCTOOLS(1.8) -AC_OUTPUT([Makefile +AC_CONFIG_FILES([Makefile specs/Makefile kbproto.pc]) +AC_OUTPUT diff --git a/proto/kbproto/specs/appD.xml b/proto/kbproto/specs/appD.xml index 5251cb42f..23aed0562 100644 --- a/proto/kbproto/specs/appD.xml +++ b/proto/kbproto/specs/appD.xml @@ -599,7 +599,7 @@ class, or feedback 1 10 type 1 BITMASK flags - #x02 XkbSA_DfltBtnAbsolute + #x04 XkbSA_DfltBtnAbsolute 1 BITMASK affect #x01 XkbSA_AffectDfltBtn 1 INT8 value