Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Needed for builds on NetBSD to work correctly, since it depends on
AC_USE_SYSTEM_EXTENSIONS defining _OPENBSD_SOURCE to expose the
prototype for reallocarray() in the system headers.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Unlikely to be hit in xrdb, but may affect other uses if this code
gets copied to other programs.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
As recommended by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
xrdb.c: In function ‘main’:
xrdb.c:1071:52: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
cmd_defines[num_cmd_defines++] = "-undef";
Signed-off-by: Walter Harms <wharms@bfs.de>
|
|
Signed-off-by: Walter Harms <wharms@bfs.de>
|
|
The world is littered with broken grep commands because `xrdb -query`
can only dump the database and doesn't implement this simple search
feature. This patch adds a new `-get` option to search and print the
content of a single property by name.
Signed-off-by: Michele Guerini Rocco <rnhm...@inventati.org>
Reviewed-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Walter Harms <wharms@bfs.de>
|
|
If a binary file which starts with 0x00 is edited, xrdb performs
an off-by-one read outside of its buffer.
The fix is simple: Do not try to append an empty string to buffer,
which would be a no-op anyway.
Proof of Concept (compile with -fsanitize=address):
$ dd if=/dev/zero bs=1 count=1 of=poc.txt
$ xrdb -edit poc.txt
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=98300
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
|
|
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
fall-outs, when they contain space.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Syncs the invocation of configure with the one from the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Flagged by clang:
xrdb.c:92:9: warning: macro is not used [-Wunused-macros]
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Gets rid of these warnings:
configure.ac:54: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
configure.ac:54: the top level
configure.ac:61: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2591: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
configure.ac:61: the top level
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
See http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Also adds missing entry for -help flag to usage message.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-By: Matt Dew <marcoz@osource.org>
|
|
Restores ability to use m4 (broken in xrdb-1.0.8 by commit 117021570515f)
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=34546
Reviewed-by: <wharms@bfs.de>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
GNU cpp is predefining a number of symbols, depending on the host and target
architecture. This can produce some unexpected results: for example, the
expansion of CLIENTHOST if the host name is i386.my.domain.
The attached patch creates a new -undef option to xrdb that is passed to
cpp.
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Renamed "buffer" to "b" and "dpy" to "display" to match common patterns
in other functions in xrdb.c
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Should never happen, but has been reported as happening at least once:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488535
Instead prints warning messages to stderr to help diagnose where the
bad visual information is coming from.
(Tested by temporarily commenting out names in the ClassName array.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Reported by John Feuerstein at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649187
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
The preprocessor used for xrdb may require a command line option to
produce the desired output. For the GNU cpp this could be
'traditional-cpp' which may not be valid for other preprocessors.
Therefore support the specification of preprocessors along with
required command line arguments when using the '--with-cpp' configure
option.
Example:
./configure --with-cpp="/usr/bin/cpp --traditional-cpp, /usr/lib/cpp".
v2: Followed a suggestion by Julien Cristau <jcristau@debian.org>
to allocate memory for the dup string dynamically instead of
using a static buffer.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
|
|
The CPP macro may contain a list of preprocessors to chose from.
In the usage message describing the -cpp command line option print
the preprocessor that would actually be chosen.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
(Note that PATHETICCPP seems to be never defined now, see [1])
[1] http://lists.x.org/archives/xorg-devel/2010-October/013860.html
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
|
Fixes generation of the EXT_<extension-name> #defines, since cpp treats
a #define EXT_MIT-SHM as a token "EXT_MIT" with a value of "-SHM".
Without this fix, an xrdb built with PATHETICCPP prints warnings of:
macro EXT_XC redefines previous macro at "", line 27
macro EXT_XVideo redefines previous macro at "", line 33
macro EXT_MIT redefines previous macro at "", line 35
macro EXT_MIT redefines previous macro at "", line 37
due to extension #defines such as EXT_MIT-SCREEN-SAVER & EXT_MIT-SHM
conflicting with each other.
Now matches the non-PATHETICCPP handling of #define names.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|