Update to xkbcomp 1.2.4
This commit is contained in:
parent
4f06515ad9
commit
430b4661ef
@ -1,3 +1,150 @@
|
||||
commit f2eff337176551f643e35c54c1e1ca0a78df69c6
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Thu Mar 22 22:02:56 2012 -0700
|
||||
|
||||
xkbcomp 1.2.4
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit b4fafc4fa7edc4c04c3c0affae0d7f79a63e8d2f
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Dec 28 20:57:55 2011 -0800
|
||||
|
||||
Delete redundant redeclarations of extern Atoms in symbols.c
|
||||
|
||||
Fixes gcc warnings of:
|
||||
|
||||
symbols.c:43: warning: redundant redeclaration of 'tok_ONE_LEVEL'
|
||||
tokens.h:99: warning: previous declaration of 'tok_ONE_LEVEL' was here
|
||||
symbols.c:44: warning: redundant redeclaration of 'tok_TWO_LEVEL'
|
||||
tokens.h:100: warning: previous declaration of 'tok_TWO_LEVEL' was here
|
||||
symbols.c:45: warning: redundant redeclaration of 'tok_KEYPAD'
|
||||
tokens.h:102: warning: previous declaration of 'tok_KEYPAD' was here
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 3835cae3cb1ad1073cbb2711f938beb878b4986c
|
||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Wed Dec 28 20:53:45 2011 -0800
|
||||
|
||||
Make sure to leave room for trailing nil byte in yyGetNumber
|
||||
|
||||
...though really, by the time you've added 1023 digits to the number
|
||||
you want to parse, you've got much bigger problems than an off-by-one
|
||||
error in your buffer count.
|
||||
|
||||
Fixes parfait warnings:
|
||||
Buffer overflow (CWE 120): In array dereference of (*buf)[nInBuf] with index 'nInBuf'
|
||||
Array size is 1024 bytes, nInBuf >= 1 and nInBuf <= 1024
|
||||
at line 625 of xkbscan.c in function 'yyGetNumber'.
|
||||
Buffer overflow (CWE 120): In array dereference of (*buf)[nInBuf] with index 'nInBuf'
|
||||
Array size is 1024 bytes, nInBuf <= 1025
|
||||
at line 632 of xkbscan.c in function 'yyGetNumber'.
|
||||
|
||||
[ This bug was found by the Parfait 0.4.2 bug checking tool.
|
||||
For more information see http://labs.oracle.com/projects/parfait/ ]
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit 1447071942dbbbfc37b08417c74c8a1d302c1626
|
||||
Author: Andreas Wettstein <wettstein509@solnet.ch>
|
||||
Date: Fri Dec 2 20:10:06 2011 +0000
|
||||
|
||||
include resets group compatibility modifiers #43091
|
||||
|
||||
This change makes sure that include does not overwrite previous
|
||||
compatibility modifier settings when the included files does not
|
||||
explicitly specify them.
|
||||
|
||||
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
|
||||
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
||||
|
||||
commit 5fd14db5b2cc0c2c43f7a1ddefd6f9991eb1dcc2
|
||||
Author: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Fri Nov 11 11:18:43 2011 -0800
|
||||
|
||||
Silence -Wparentheses-equality
|
||||
|
||||
warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit 6099655a4bbe1fd3e26b8afd2b91888ad2766086
|
||||
Author: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Fri Nov 11 11:17:38 2011 -0800
|
||||
|
||||
Silence -Wshadow warnings
|
||||
|
||||
warning: declaration shadows a local variable [-Wshadow]
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit b7e88debd937be147d3581b9c8720c0bfe354052
|
||||
Author: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Fri Nov 11 11:13:42 2011 -0800
|
||||
|
||||
Correct our zeroing out of the row in InitRowInfo
|
||||
|
||||
geometry.c:369:20: warning: argument to 'sizeof' in '__builtin___memset_chk' call is the same
|
||||
pointer type 'RowInfo *' (aka 'struct _RowInfo *') as the destination; expected 'RowInfo'
|
||||
(aka 'struct _RowInfo') or an explicit length [-Wsizeof-pointer-memaccess]
|
||||
bzero(row, sizeof(RowInfo *));
|
||||
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit 33b5c9413463613d341d15184b34a4f4c4e70e56
|
||||
Author: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Fri Nov 11 11:12:22 2011 -0800
|
||||
|
||||
Fix -Wformat warnings
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit b9f6482d5fc413222334c2370ef8b9693f4b50fd
|
||||
Author: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Fri Nov 11 11:07:30 2011 -0800
|
||||
|
||||
Add missing _X_NORETURN to uFatalError
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit 8ea06128c70b07c265a217222f2a245aad4bfce4
|
||||
Author: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
Date: Fri Nov 11 11:06:02 2011 -0800
|
||||
|
||||
Include strings.h for strcasecmp and string.h for strdup
|
||||
|
||||
Our minimum requirement for X11 is currently Unix98. Unix98 provides
|
||||
strcasecmp in <strings.h>. This commit fixes implicit declarations
|
||||
of this function on systems that closely adhere to the standard.
|
||||
|
||||
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
||||
|
||||
commit 89c8317ad84386f69d31f38dcddbc7ff0abffb31
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Tue Jul 5 08:23:37 2011 +1000
|
||||
|
||||
Add .pc file for version export
|
||||
|
||||
Exports xkbcomp version and the xkb base directory.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
||||
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
||||
|
||||
commit cdb8677f370b34a3a523a32ae0023c7e8c0c965c
|
||||
Author: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Date: Wed Jun 22 10:41:33 2011 +1000
|
||||
|
||||
Print version number on -version.
|
||||
|
||||
This commit isn't playing the WARN/M/M1 macro game. Version numbers to to
|
||||
stdout, full stop.
|
||||
|
||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
|
||||
commit cef4ba4b8fdc9a5439f71437c08cf690a750bd6b
|
||||
Author: Daniel Stone <daniel@fooishbar.org>
|
||||
Date: Tue Jun 21 16:04:45 2011 +0100
|
||||
|
@ -60,6 +60,9 @@ xkbcomp_SOURCES = \
|
||||
xkbpath.h \
|
||||
xkbscan.c
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = xkbcomp.pc
|
||||
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
@ -35,6 +35,7 @@
|
||||
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
@ -60,8 +61,9 @@ host_triplet = @host@
|
||||
bin_PROGRAMS = xkbcomp$(EXEEXT)
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure COPYING ChangeLog INSTALL config.guess \
|
||||
config.sub depcomp install-sh missing xkbparse.c
|
||||
$(srcdir)/xkbcomp.pc.in $(top_srcdir)/configure COPYING \
|
||||
ChangeLog INSTALL config.guess config.sub depcomp install-sh \
|
||||
missing xkbparse.c
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
@ -71,8 +73,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
CONFIG_CLEAN_FILES = xkbcomp.pc
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_xkbcomp_OBJECTS = action.$(OBJEXT) alias.$(OBJEXT) compat.$(OBJEXT) \
|
||||
@ -101,6 +103,14 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-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 = `echo $$p | sed -e 's|^.*/||'`;
|
||||
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(pkgconfig_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
@ -128,6 +138,7 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_CFLAGS = @BASE_CFLAGS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@ -175,9 +186,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
REQUIRED_MODULES = @REQUIRED_MODULES@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XKBCOMP_CFLAGS = @XKBCOMP_CFLAGS@
|
||||
@ -268,6 +281,8 @@ xkbcomp_SOURCES = \
|
||||
xkbpath.h \
|
||||
xkbscan.c
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = xkbcomp.pc
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
@ -324,6 +339,8 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
xkbcomp.pc: $(top_builddir)/config.status $(srcdir)/xkbcomp.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@ -412,6 +429,23 @@ distclean-compile:
|
||||
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
|
||||
rm -f y.tab.c
|
||||
uninstall-info-am:
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@list='$(pkgconfig_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
|
||||
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
@ -548,6 +582,7 @@ distclean-tags:
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/.
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
@ -691,10 +726,10 @@ distcleancheck: distclean
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(PROGRAMS) config.h
|
||||
all-am: Makefile $(PROGRAMS) $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
@ -744,7 +779,7 @@ info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
install-data-am: install-pkgconfigDATA
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
@ -773,7 +808,8 @@ ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
|
||||
uninstall-pkgconfigDATA
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
@ -786,12 +822,14 @@ uninstall-info: uninstall-info-recursive
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||
install-info-am install-man install-pkgconfigDATA \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-info-am \
|
||||
uninstall-pkgconfigDATA
|
||||
|
||||
|
||||
.PHONY: ChangeLog INSTALL
|
||||
|
501
app/xkbcomp/aclocal.m4
vendored
501
app/xkbcomp/aclocal.m4
vendored
@ -1022,7 +1022,7 @@ dnl DEALINGS IN THE SOFTWARE.
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.13.0])
|
||||
m4_define([vers_have], [1.16.2])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
@ -1049,7 +1049,7 @@ AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
||||
# which is not the best choice for supporting other OS'es, but covers most
|
||||
# of the ones we need for now.
|
||||
AC_MSG_CHECKING([if $RAWCPP requires -undef])
|
||||
AC_LANG_CONFTEST([Does cpp redefine unix ?])
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
|
||||
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
@ -1067,7 +1067,7 @@ fi
|
||||
rm -f conftest.$ac_ext
|
||||
|
||||
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
|
||||
AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])])
|
||||
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
@ -1442,6 +1442,8 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_XSLTPROC],[
|
||||
AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
|
||||
# Preserves the interface, should it be implemented later
|
||||
m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(xsltproc,
|
||||
AS_HELP_STRING([--with-xsltproc],
|
||||
@ -1472,13 +1474,65 @@ else
|
||||
AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
|
||||
fi
|
||||
|
||||
# Checking for minimum version is not implemented
|
||||
# but we want to keep the interface consistent with other commands
|
||||
m4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)])
|
||||
|
||||
AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
|
||||
]) # XORG_WITH_XSLTPROC
|
||||
|
||||
# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
|
||||
# ----------------------------------------
|
||||
# Minimum version: 1.15.0
|
||||
#
|
||||
# PERL (Practical Extraction and Report Language) is a language optimized for
|
||||
# scanning arbitrary text files, extracting information from those text files,
|
||||
# and printing reports based on that information.
|
||||
#
|
||||
# When DEFAULT is not specified, --with-perl assumes 'auto'.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_PERL: used in makefiles to conditionally scan text files
|
||||
# PERL: returns the path of the perl program found
|
||||
# returns the path set by the user in the environment
|
||||
# --with-perl: 'yes' user instructs the module to use perl
|
||||
# 'no' user instructs the module not to use perl
|
||||
# have_perl: returns yes if perl found in PATH or no
|
||||
#
|
||||
# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_PERL],[
|
||||
AC_ARG_VAR([PERL], [Path to perl command])
|
||||
# Preserves the interface, should it be implemented later
|
||||
m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(perl,
|
||||
AS_HELP_STRING([--with-perl],
|
||||
[Use perl for extracting information from files (default: ]_defopt[)]),
|
||||
[use_perl=$withval], [use_perl=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
|
||||
if test "x$use_perl" = x"auto"; then
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
if test "x$PERL" = "x"; then
|
||||
AC_MSG_WARN([perl not found - cannot extract information and report])
|
||||
have_perl=no
|
||||
else
|
||||
have_perl=yes
|
||||
fi
|
||||
elif test "x$use_perl" = x"yes" ; then
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
if test "x$PERL" = "x"; then
|
||||
AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
|
||||
fi
|
||||
have_perl=yes
|
||||
elif test "x$use_perl" = x"no" ; then
|
||||
if test "x$PERL" != "x"; then
|
||||
AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
|
||||
fi
|
||||
have_perl=no
|
||||
else
|
||||
AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
|
||||
]) # XORG_WITH_PERL
|
||||
|
||||
# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
|
||||
# ----------------
|
||||
@ -1725,10 +1779,11 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
|
||||
AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
|
||||
]) # XORG_WITH_GROFF
|
||||
|
||||
# XORG_WITH_FOP([DEFAULT])
|
||||
# ----------------
|
||||
# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
|
||||
# ---------------------------------------
|
||||
# Minimum version: 1.6.0
|
||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||
# Minimum version for optional MIN-VERSION argument: 1.15.0
|
||||
#
|
||||
# Documentation tools are not always available on all platforms and sometimes
|
||||
# not at the appropriate level. This macro enables a module to test for the
|
||||
@ -1748,7 +1803,7 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_FOP],[
|
||||
AC_ARG_VAR([FOP], [Path to fop command])
|
||||
m4_define([_defopt], m4_default([$1], [auto]))
|
||||
m4_define([_defopt], m4_default([$2], [auto]))
|
||||
AC_ARG_WITH(fop,
|
||||
AS_HELP_STRING([--with-fop],
|
||||
[Use fop to regenerate documentation (default: ]_defopt[)]),
|
||||
@ -1777,6 +1832,22 @@ elif test "x$use_fop" = x"no" ; then
|
||||
else
|
||||
AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
|
||||
fi
|
||||
|
||||
# Test for a minimum version of fop, if provided.
|
||||
m4_ifval([$1],
|
||||
[if test "$have_fop" = yes; then
|
||||
# scrape the fop version
|
||||
AC_MSG_CHECKING([for fop minimum version])
|
||||
fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
|
||||
AC_MSG_RESULT([$fop_version])
|
||||
AS_VERSION_COMPARE([$fop_version], [$1],
|
||||
[if test "x$use_fop" = xauto; then
|
||||
AC_MSG_WARN([fop version $fop_version found, but $1 needed])
|
||||
have_fop=no
|
||||
else
|
||||
AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
|
||||
fi])
|
||||
fi])
|
||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||
]) # XORG_WITH_FOP
|
||||
|
||||
@ -1959,6 +2030,7 @@ AC_MSG_RESULT([$build_specs])
|
||||
AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
|
||||
AC_BEFORE([$0], [XORG_WITH_GLIB])
|
||||
AC_BEFORE([$0], [XORG_LD_WRAP])
|
||||
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
|
||||
m4_define([_defopt], m4_default([$1], [auto]))
|
||||
AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
|
||||
[Enable building unit test cases (default: ]_defopt[)]),
|
||||
@ -1969,6 +2041,39 @@ AC_MSG_CHECKING([whether to build unit test cases])
|
||||
AC_MSG_RESULT([$enable_unit_tests])
|
||||
]) # XORG_ENABLE_UNIT_TESTS
|
||||
|
||||
# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
|
||||
# ------------------------------------------------------
|
||||
# Minimum version: 1.17.0
|
||||
#
|
||||
# This macro enables a builder to enable/disable integration testing
|
||||
# It makes no assumption about the test cases' implementation
|
||||
# Test cases may or may not use Automake "Support for test suites"
|
||||
#
|
||||
# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
|
||||
# usually requires less dependencies and may be built and run under less
|
||||
# stringent environments than integration tests.
|
||||
#
|
||||
# Interface to module:
|
||||
# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests
|
||||
# enable_integration_tests: used in configure.ac for additional configuration
|
||||
# --enable-integration-tests: 'yes' user instructs the module to build tests
|
||||
# 'no' user instructs the module not to build tests
|
||||
# parm1: specify the default value, yes or no.
|
||||
#
|
||||
AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
|
||||
AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
|
||||
m4_define([_defopt], m4_default([$1], [auto]))
|
||||
AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
|
||||
[Enable building integration test cases (default: ]_defopt[)]),
|
||||
[enable_integration_tests=$enableval],
|
||||
[enable_integration_tests=]_defopt)
|
||||
m4_undefine([_defopt])
|
||||
AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
|
||||
[test "x$enable_integration_tests" != xno])
|
||||
AC_MSG_CHECKING([whether to build unit test cases])
|
||||
AC_MSG_RESULT([$enable_integration_tests])
|
||||
]) # XORG_ENABLE_INTEGRATION_TESTS
|
||||
|
||||
# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
|
||||
# ----------------------------------------
|
||||
# Minimum version: 1.13.0
|
||||
@ -1979,6 +2084,10 @@ AC_MSG_RESULT([$enable_unit_tests])
|
||||
# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
|
||||
# Otherwise the value of $enable_unit_tests is blank.
|
||||
#
|
||||
# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
|
||||
# test support usually requires less dependencies and may be built and run under
|
||||
# less stringent environments than integration tests.
|
||||
#
|
||||
# Interface to module:
|
||||
# HAVE_GLIB: used in makefiles to conditionally build targets
|
||||
# with_glib: used in configure.ac to know if GLib has been found
|
||||
@ -2030,8 +2139,8 @@ fi
|
||||
AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
|
||||
]) # XORG_WITH_GLIB
|
||||
|
||||
# XORG_LD_WRAP
|
||||
# ------------
|
||||
# XORG_LD_WRAP([required|optional])
|
||||
# ---------------------------------
|
||||
# Minimum version: 1.13.0
|
||||
#
|
||||
# Check if linker supports -wrap, passed via compiler flags
|
||||
@ -2039,10 +2148,18 @@ AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
|
||||
# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
|
||||
# Otherwise the value of $enable_unit_tests is blank.
|
||||
#
|
||||
# Argument added in 1.16.0 - default is "required", to match existing behavior
|
||||
# of returning an error if enable_unit_tests is yes, and ld -wrap is not
|
||||
# available, an argument of "optional" allows use when some unit tests require
|
||||
# ld -wrap and others do not.
|
||||
#
|
||||
AC_DEFUN([XORG_LD_WRAP],[
|
||||
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
|
||||
XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
|
||||
[AC_LANG_PROGRAM([#include <stdlib.h>
|
||||
void __wrap_exit(int status) { return; }],
|
||||
[exit(0);])])
|
||||
# Not having ld wrap when unit testing has been explicitly requested is an error
|
||||
if test "x$enable_unit_tests" = x"yes"; then
|
||||
if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
|
||||
if test "x$have_ld_wrap" = x"no"; then
|
||||
AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
|
||||
fi
|
||||
@ -2055,7 +2172,7 @@ AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
|
||||
# -----------------------
|
||||
# SYNOPSIS
|
||||
#
|
||||
# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
|
||||
# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
@ -2065,6 +2182,8 @@ AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
|
||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
||||
# success/failure.
|
||||
#
|
||||
# PROGRAM-SOURCE is the program source to link with, if needed
|
||||
#
|
||||
# NOTE: Based on AX_CHECK_COMPILER_FLAGS.
|
||||
#
|
||||
# LICENSE
|
||||
@ -2105,7 +2224,7 @@ AS_LITERAL_IF([$1],
|
||||
[AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
|
||||
ax_save_FLAGS=$LDFLAGS
|
||||
LDFLAGS="$1"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
||||
AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
|
||||
AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
|
||||
AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
|
||||
LDFLAGS=$ax_save_FLAGS])],
|
||||
@ -2124,6 +2243,52 @@ else
|
||||
fi
|
||||
]) # XORG_CHECK_LINKER_FLAGS
|
||||
|
||||
# XORG_MEMORY_CHECK_FLAGS
|
||||
# -----------------------
|
||||
# Minimum version: 1.16.0
|
||||
#
|
||||
# This macro attempts to find appropriate memory checking functionality
|
||||
# for various platforms which unit testing code may use to catch various
|
||||
# forms of memory allocation and access errors in testing.
|
||||
#
|
||||
# Interface to module:
|
||||
# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
|
||||
# Usually added to TESTS_ENVIRONMENT in Makefile.am
|
||||
#
|
||||
# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
|
||||
#
|
||||
AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
|
||||
[Environment variables to enable memory checking in tests])
|
||||
|
||||
# Check for different types of support on different platforms
|
||||
case $host_os in
|
||||
solaris*)
|
||||
AC_CHECK_LIB([umem], [umem_alloc],
|
||||
[malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
|
||||
;;
|
||||
*-gnu*) # GNU libc - Value is used as a single byte bit pattern,
|
||||
# both directly and inverted, so should not be 0 or 255.
|
||||
malloc_debug_env='MALLOC_PERTURB_=15'
|
||||
;;
|
||||
darwin*)
|
||||
malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
|
||||
;;
|
||||
*bsd*)
|
||||
malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
|
||||
;;
|
||||
esac
|
||||
|
||||
# User supplied flags override default flags
|
||||
if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
|
||||
malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
|
||||
fi
|
||||
|
||||
AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
|
||||
]) # XORG_WITH_LINT
|
||||
|
||||
# XORG_CHECK_MALLOC_ZERO
|
||||
# ----------------------
|
||||
# Minimum version: 1.0.0
|
||||
@ -2275,59 +2440,300 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
|
||||
]) # XORG_LINT_LIBRARY
|
||||
|
||||
# XORG_COMPILER_BRAND
|
||||
# -------------------
|
||||
# Minimum version: 1.14.0
|
||||
#
|
||||
# Checks for various brands of compilers and sets flags as appropriate:
|
||||
# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
|
||||
# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
|
||||
# clang compiler - sets CLANGCC to "yes"
|
||||
# Intel compiler - sets INTELCC to "yes"
|
||||
# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
|
||||
#
|
||||
AC_DEFUN([XORG_COMPILER_BRAND], [
|
||||
AC_LANG_CASE(
|
||||
[C], [
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
],
|
||||
[C++], [
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
]
|
||||
)
|
||||
AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
|
||||
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
]) # XORG_COMPILER_BRAND
|
||||
|
||||
# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
|
||||
# ---------------
|
||||
# Minimum version: 1.16.0
|
||||
#
|
||||
# Test if the compiler works when passed the given flag as a command line argument.
|
||||
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the
|
||||
# next flag in the list until there are no more options.
|
||||
#
|
||||
# Note that this does not guarantee that the compiler supports the flag as some
|
||||
# compilers will simply ignore arguments that they do not understand, but we do
|
||||
# attempt to weed out false positives by using -Werror=unknown-warning-option and
|
||||
# -Werror=unused-command-line-argument
|
||||
#
|
||||
AC_DEFUN([XORG_TESTSET_CFLAG], [
|
||||
m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
|
||||
m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
|
||||
|
||||
AC_LANG_COMPILER_REQUIRE
|
||||
|
||||
AC_LANG_CASE(
|
||||
[C], [
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
define([PREFIX], [C])
|
||||
define([CACHE_PREFIX], [cc])
|
||||
define([COMPILER], [$CC])
|
||||
],
|
||||
[C++], [
|
||||
define([PREFIX], [CXX])
|
||||
define([CACHE_PREFIX], [cxx])
|
||||
define([COMPILER], [$CXX])
|
||||
]
|
||||
)
|
||||
|
||||
[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
|
||||
|
||||
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||
AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
|
||||
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
|
||||
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
|
||||
[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
|
||||
[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
|
||||
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
|
||||
fi
|
||||
|
||||
if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
|
||||
if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||
fi
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
||||
AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
|
||||
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
|
||||
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
|
||||
[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
|
||||
[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
|
||||
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
|
||||
fi
|
||||
|
||||
found="no"
|
||||
m4_foreach([flag], m4_cdr($@), [
|
||||
if test $found = "no" ; then
|
||||
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||
fi
|
||||
|
||||
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
||||
fi
|
||||
|
||||
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
|
||||
|
||||
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
|
||||
AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
|
||||
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
|
||||
AC_CACHE_VAL($cacheid,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
|
||||
[eval $cacheid=yes],
|
||||
[eval $cacheid=no])])
|
||||
|
||||
PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
|
||||
|
||||
eval supported=\$$cacheid
|
||||
AC_MSG_RESULT([$supported])
|
||||
if test "$supported" = "yes" ; then
|
||||
$1="$$1 ]flag["
|
||||
found="yes"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
]) # XORG_TESTSET_CFLAG
|
||||
|
||||
# XORG_COMPILER_FLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.16.0
|
||||
#
|
||||
# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
|
||||
# arguments supported by the selected compiler which do NOT alter the generated
|
||||
# code. These arguments will cause the compiler to print various warnings
|
||||
# during compilation AND turn a conservative set of warnings into errors.
|
||||
#
|
||||
# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
|
||||
# future versions of util-macros as options are added to new compilers.
|
||||
#
|
||||
AC_DEFUN([XORG_COMPILER_FLAGS], [
|
||||
AC_REQUIRE([XORG_COMPILER_BRAND])
|
||||
|
||||
AC_ARG_ENABLE(selective-werror,
|
||||
AS_HELP_STRING([--disable-selective-werror],
|
||||
[Turn off selective compiler errors. (default: enabled)]),
|
||||
[SELECTIVE_WERROR=$enableval],
|
||||
[SELECTIVE_WERROR=yes])
|
||||
|
||||
AC_LANG_CASE(
|
||||
[C], [
|
||||
define([PREFIX], [C])
|
||||
],
|
||||
[C++], [
|
||||
define([PREFIX], [CXX])
|
||||
]
|
||||
)
|
||||
# -v is too short to test reliably with XORG_TESTSET_CFLAG
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
[BASE_]PREFIX[FLAGS]="-v"
|
||||
else
|
||||
[BASE_]PREFIX[FLAGS]=""
|
||||
fi
|
||||
|
||||
# This chunk of warnings were those that existed in the legacy CWARNFLAGS
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
|
||||
|
||||
AC_LANG_CASE(
|
||||
[C], [
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
|
||||
]
|
||||
)
|
||||
|
||||
# This chunk adds additional warnings that could catch undesired effects.
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
|
||||
|
||||
# These are currently disabled because they are noisy. They will be enabled
|
||||
# in the future once the codebase is sufficiently modernized to silence
|
||||
# them. For now, I don't want them to drown out the other warnings.
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
|
||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
|
||||
|
||||
# Turn some warnings into errors, so we don't accidently get successful builds
|
||||
# when there are problems that should be fixed.
|
||||
|
||||
if test "x$SELECTIVE_WERROR" = "xyes" ; then
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
|
||||
else
|
||||
AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
|
||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
|
||||
fi
|
||||
|
||||
AC_SUBST([BASE_]PREFIX[FLAGS])
|
||||
]) # XORG_COMPILER_FLAGS
|
||||
|
||||
# XORG_CWARNFLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.2.0
|
||||
# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
|
||||
#
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
# This function is deprecated because it defines -fno-strict-aliasing
|
||||
# which alters the code generated by the compiler. If -fno-strict-aliasing
|
||||
# is needed, then it should be added explicitly in the module when
|
||||
# it is updated to use BASE_CFLAGS.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast -Wformat=2"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
CWARNFLAGS="-v"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
AC_REQUIRE([XORG_COMPILER_FLAGS])
|
||||
AC_REQUIRE([XORG_COMPILER_BRAND])
|
||||
AC_LANG_CASE(
|
||||
[C], [
|
||||
CWARNFLAGS="$BASE_CFLAGS"
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
]
|
||||
)
|
||||
]) # XORG_CWARNFLAGS
|
||||
|
||||
# XORG_STRICT_OPTION
|
||||
# -----------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
# Add configure option to enable strict compilation flags, such as treating
|
||||
# warnings as fatal errors.
|
||||
# If --enable-strict-compilation is passed to configure, adds strict flags to
|
||||
# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
|
||||
#
|
||||
# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
|
||||
# when strict compilation is unconditionally desired.
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([XORG_CWARNFLAGS])
|
||||
AC_REQUIRE([XORG_COMPILER_FLAGS])
|
||||
|
||||
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])
|
||||
|
||||
AC_LANG_CASE(
|
||||
[C], [
|
||||
define([PREFIX], [C])
|
||||
],
|
||||
[C++], [
|
||||
define([PREFIX], [CXX])
|
||||
]
|
||||
)
|
||||
|
||||
[STRICT_]PREFIX[FLAGS]=""
|
||||
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
|
||||
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
|
||||
|
||||
# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
|
||||
# activate it with -Werror, so we add it here explicitly.
|
||||
XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
|
||||
|
||||
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
|
||||
[BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
|
||||
AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
AC_SUBST([CWARNFLAGS])
|
||||
AC_SUBST([STRICT_]PREFIX[FLAGS])
|
||||
AC_SUBST([BASE_]PREFIX[FLAGS])
|
||||
AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
@ -2338,6 +2744,7 @@ AC_SUBST([CWARNFLAGS])
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
AC_REQUIRE([AC_PROG_INSTALL])
|
||||
XORG_COMPILER_FLAGS
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
|
@ -215,10 +215,10 @@ ApplyAliases(XkbDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
||||
{
|
||||
if (strncmp(a->alias, info->alias, XkbKeyNameLength) == 0)
|
||||
{
|
||||
AliasInfo old;
|
||||
InitAliasInfo(&old, MergeAugment, 0, a->alias, a->real);
|
||||
HandleCollision(&old, info);
|
||||
memcpy(old.real, a->real, XkbKeyNameLength);
|
||||
AliasInfo oldai;
|
||||
InitAliasInfo(&oldai, MergeAugment, 0, a->alias, a->real);
|
||||
HandleCollision(&oldai, info);
|
||||
memcpy(oldai.real, a->real, XkbKeyNameLength);
|
||||
info->alias[0] = '\0';
|
||||
nNew--;
|
||||
break;
|
||||
@ -278,7 +278,7 @@ ApplyAliases(XkbDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
||||
if ((a - old) != (nOld + nNew))
|
||||
{
|
||||
WSGO2("Expected %d aliases total but created %d\n", nOld + nNew,
|
||||
a - old);
|
||||
(int)(a - old));
|
||||
}
|
||||
#endif
|
||||
if (toGeom)
|
||||
|
@ -50,6 +50,7 @@ typedef struct _GroupCompatInfo
|
||||
{
|
||||
unsigned char fileID;
|
||||
unsigned char merge;
|
||||
Bool defined;
|
||||
unsigned char real_mods;
|
||||
unsigned short vmods;
|
||||
} GroupCompatInfo;
|
||||
@ -280,8 +281,8 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC)
|
||||
ACTION1("Using %s definition\n",
|
||||
(merge == MergeAugment ? "old" : "new"));
|
||||
}
|
||||
if (merge != MergeAugment)
|
||||
*gc = *newGC;
|
||||
if(newGC->defined && (merge != MergeAugment || !gc->defined))
|
||||
*gc = *newGC;
|
||||
return True;
|
||||
}
|
||||
|
||||
@ -715,6 +716,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
|
||||
}
|
||||
tmp.real_mods = val.uval & 0xff;
|
||||
tmp.vmods = (val.uval >> 8) & 0xffff;
|
||||
tmp.defined = True;
|
||||
return AddGroupCompat(info, def->group - 1, &tmp);
|
||||
}
|
||||
|
||||
|
9802
app/xkbcomp/configure
vendored
9802
app/xkbcomp/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([xkbcomp], [1.2.3],
|
||||
AC_INIT([xkbcomp], [1.2.4],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xkbcomp])
|
||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
@ -45,8 +45,11 @@ fi
|
||||
|
||||
AC_CHECK_FUNCS([strdup strcasecmp])
|
||||
|
||||
REQUIRED_MODULES="x11 xkbfile xproto >= 7.0.17"
|
||||
|
||||
# Checks for pkg-config packages
|
||||
PKG_CHECK_MODULES(XKBCOMP, x11 xkbfile)
|
||||
PKG_CHECK_MODULES(XKBCOMP, [$REQUIRED_MODULES])
|
||||
AC_SUBST(REQUIRED_MODULES)
|
||||
|
||||
AC_ARG_WITH([xkb_config_root],
|
||||
[AS_HELP_STRING([--with-xkb-config-root=<paths>],
|
||||
@ -58,5 +61,6 @@ AC_SUBST([XKBCONFIGROOT])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
man/Makefile])
|
||||
man/Makefile
|
||||
xkbcomp.pc])
|
||||
AC_OUTPUT
|
||||
|
@ -366,7 +366,7 @@ InitRowInfo(RowInfo * row, SectionInfo * section, GeometryInfo * info)
|
||||
}
|
||||
else
|
||||
{
|
||||
bzero(row, sizeof(RowInfo *));
|
||||
bzero(row, sizeof(*row));
|
||||
row->defs.defined = _GR_Default;
|
||||
row->defs.fileID = info->fileID;
|
||||
row->defs.merge = info->merge;
|
||||
@ -3611,11 +3611,11 @@ CopySectionDef(XkbGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
||||
key->shape_ndx = 0;
|
||||
else
|
||||
{
|
||||
ShapeInfo *si;
|
||||
si = FindShape(info, ki->shape, "key", keyText(ki));
|
||||
if (!si)
|
||||
ShapeInfo *sinfo;
|
||||
sinfo = FindShape(info, ki->shape, "key", keyText(ki));
|
||||
if (!sinfo)
|
||||
return False;
|
||||
key->shape_ndx = si->index;
|
||||
key->shape_ndx = sinfo->index;
|
||||
}
|
||||
if (ki->color != None)
|
||||
color =
|
||||
|
@ -70,6 +70,7 @@ AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BASE_CFLAGS = @BASE_CFLAGS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
@ -117,9 +118,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
REQUIRED_MODULES = @REQUIRED_MODULES@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRICT_CFLAGS = @STRICT_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
XKBCOMP_CFLAGS = @XKBCOMP_CFLAGS@
|
||||
|
@ -88,6 +88,9 @@ Specifies the root directory for relative path names.
|
||||
.B -synch
|
||||
Force synchronization for X requests.
|
||||
.TP 8
|
||||
.B -version
|
||||
Print version number.
|
||||
.TP 8
|
||||
.B \-w\ \fIlvl\fP
|
||||
Controls the reporting of warnings during compilation. A warning level
|
||||
of 0 disables all warnings; a warning level of 10 enables them all.
|
||||
|
@ -748,12 +748,12 @@ IncludeCreate(char *str, unsigned merge)
|
||||
void
|
||||
PrintStmtAddrs(ParseCommon * stmt)
|
||||
{
|
||||
fprintf(stderr, "0x%x", stmt);
|
||||
fprintf(stderr, "%p", stmt);
|
||||
if (stmt)
|
||||
{
|
||||
do
|
||||
{
|
||||
fprintf(stderr, "->0x%x", stmt->next);
|
||||
fprintf(stderr, "->%p", stmt->next);
|
||||
stmt = stmt->next;
|
||||
}
|
||||
while (stmt);
|
||||
|
@ -40,10 +40,6 @@
|
||||
#include "misc.h"
|
||||
#include "alias.h"
|
||||
|
||||
extern Atom tok_ONE_LEVEL;
|
||||
extern Atom tok_TWO_LEVEL;
|
||||
extern Atom tok_KEYPAD;
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
#define RepeatYes 1
|
||||
@ -1714,7 +1710,7 @@ FindKeyForSymbol(XkbDescPtr xkb, KeySym sym, unsigned int *kc_rtrn)
|
||||
if (j < (int) XkbKeyNumSyms(xkb, i))
|
||||
{
|
||||
gotOne = True;
|
||||
if ((XkbKeySym(xkb, i, j) == sym))
|
||||
if (XkbKeySym(xkb, i, j) == sym)
|
||||
{
|
||||
*kc_rtrn = i;
|
||||
return True;
|
||||
|
@ -159,7 +159,7 @@ uInformation(const char * /* s */ , ...
|
||||
#define FATAL uFatalError
|
||||
|
||||
extern void uFatalError(const char * /* s */ , ...
|
||||
) _X_ATTRIBUTE_PRINTF(1, 2);
|
||||
) _X_ATTRIBUTE_PRINTF(1, 2) _X_NORETURN;
|
||||
|
||||
/* WSGO stands for "Weird Stuff Going On" */
|
||||
#define WSGO6 uInternalError
|
||||
@ -196,6 +196,7 @@ uInformation(const char * /* s */ , ...
|
||||
(s1)!=(s2):strcmp(s1,s2))
|
||||
#define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0)
|
||||
#ifdef HAVE_STRCASECMP
|
||||
#include <strings.h>
|
||||
#define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2))
|
||||
#define uStrCasePrefix(p,s) (strncasecmp(p,s,strlen(p))==0)
|
||||
#else
|
||||
@ -207,6 +208,7 @@ uInformation(const char * /* s */ , ...
|
||||
);
|
||||
#endif
|
||||
#ifdef HAVE_STRDUP
|
||||
#include <string.h>
|
||||
#define uStringDup(s1) ((s1) ? strdup(s1) : NULL)
|
||||
#else
|
||||
extern char *uStringDup(const char * /* s1 */
|
||||
|
@ -119,6 +119,7 @@ Usage(int argc, char *argv[])
|
||||
M1("Usage: %s [options] file[(map)] ...\n", argv[0]);
|
||||
M("Legal options:\n");
|
||||
M("-?,-help Print this message\n");
|
||||
M("-version Print the version number\n");
|
||||
if (!xkblist)
|
||||
{
|
||||
M("-a Show all actions\n");
|
||||
@ -252,7 +253,11 @@ parseArgs(int argc, char *argv[])
|
||||
Usage(argc, argv);
|
||||
exit(0);
|
||||
}
|
||||
else if ((strcmp(argv[i], "-a") == 0) && (!xkblist))
|
||||
else if (strcmp(argv[i], "-version") == 0)
|
||||
{
|
||||
printf("xkbcomp %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
} else if ((strcmp(argv[i], "-a") == 0) && (!xkblist))
|
||||
{
|
||||
showImplicit = True;
|
||||
}
|
||||
@ -648,25 +653,25 @@ parseArgs(int argc, char *argv[])
|
||||
len = strlen(inputFile);
|
||||
if (inputFile[len - 1] == ')')
|
||||
{
|
||||
char *tmp;
|
||||
if ((tmp = strchr(inputFile, '(')) != NULL)
|
||||
char *tmpstr;
|
||||
if ((tmpstr = strchr(inputFile, '(')) != NULL)
|
||||
{
|
||||
*tmp = '\0';
|
||||
*tmpstr = '\0';
|
||||
inputFile[len - 1] = '\0';
|
||||
tmp++;
|
||||
if (*tmp == '\0')
|
||||
tmpstr++;
|
||||
if (*tmpstr == '\0')
|
||||
{
|
||||
WARN("Empty map in filename\n");
|
||||
ACTION("Ignored\n");
|
||||
}
|
||||
else if (inputMap == NULL)
|
||||
{
|
||||
inputMap = uStringDup(tmp);
|
||||
inputMap = uStringDup(tmpstr);
|
||||
}
|
||||
else
|
||||
{
|
||||
WARN("Map specified in filename and with -m flag\n");
|
||||
ACTION1("map from name (\"%s\") ignored\n", tmp);
|
||||
ACTION1("map from name (\"%s\") ignored\n", tmpstr);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
9
app/xkbcomp/xkbcomp.pc.in
Normal file
9
app/xkbcomp/xkbcomp.pc.in
Normal file
@ -0,0 +1,9 @@
|
||||
prefix=@prefix@
|
||||
datarootdir=@datarootdir@
|
||||
datadir=@datadir@
|
||||
xkbconfigdir=@XKBCONFIGROOT@
|
||||
|
||||
Name: xkbcomp
|
||||
Description: XKB keymap compiler
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires.private: @REQUIRED_MODULES@
|
@ -615,16 +615,16 @@ yyGetNumber(int ch)
|
||||
nInBuf = 1;
|
||||
while (((ch = scanchar()) != EOF)
|
||||
&& (isxdigit(ch) || ((nInBuf == 1) && (ch == 'x')))
|
||||
&& nInBuf < nMaxBuffSize)
|
||||
&& nInBuf < (nMaxBuffSize - 1))
|
||||
{
|
||||
buf[nInBuf++] = ch;
|
||||
}
|
||||
if (ch == '.')
|
||||
if ((ch == '.') && (nInBuf < (nMaxBuffSize - 1)))
|
||||
{
|
||||
isFloat = 1;
|
||||
buf[nInBuf++] = ch;
|
||||
while (((ch = scanchar()) != EOF) && (isxdigit(ch))
|
||||
&& nInBuf < nMaxBuffSize)
|
||||
&& nInBuf < (nMaxBuffSize - 1))
|
||||
{
|
||||
buf[nInBuf++] = ch;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user