diff options
author | Ran Benita <ran@unusedvar.com> | 2019-12-27 13:03:20 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2019-12-27 13:09:11 +0200 |
commit | 40aab05e77d746beca4119bb254e534e449f9130 (patch) | |
tree | a00ca09bbbdd5ae972fd479255b5b45db8ce6c61 | |
parent | bdff8ebe3c0be4f55281a3ec7d70be753e2456c0 (diff) | |
download | libxkbcommon-40aab05e77d746beca4119bb254e534e449f9130.tar.gz libxkbcommon-40aab05e77d746beca4119bb254e534e449f9130.tar.bz2 libxkbcommon-40aab05e77d746beca4119bb254e534e449f9130.zip |
build: include config.h manually
Previously we included it with an `-include` compiler directive. But
that's not portable. And it's better to be explicit anyway.
Every .c file should have `include "config.h"` first thing.
Signed-off-by: Ran Benita <ran@unusedvar.com>
66 files changed, 128 insertions, 3 deletions
diff --git a/bench/bench.c b/bench/bench.c index 30889ef..2c5f23d 100644 --- a/bench/bench.c +++ b/bench/bench.c @@ -22,6 +22,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <assert.h> #include <stdio.h> #include <sys/time.h> diff --git a/bench/compose.c b/bench/compose.c index bb949d8..6951bd5 100644 --- a/bench/compose.c +++ b/bench/compose.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <time.h> #include "xkbcommon/xkbcommon-compose.h" diff --git a/bench/key-proc.c b/bench/key-proc.c index c09b389..cee3dfa 100644 --- a/bench/key-proc.c +++ b/bench/key-proc.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <stdlib.h> #include <time.h> diff --git a/bench/rules.c b/bench/rules.c index 751370f..3206583 100644 --- a/bench/rules.c +++ b/bench/rules.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <time.h> #include "../test/test.h" diff --git a/bench/rulescomp.c b/bench/rulescomp.c index aecb37f..3972a7b 100644 --- a/bench/rulescomp.c +++ b/bench/rulescomp.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <time.h> #include "../test/test.h" diff --git a/fuzz/compose/target.c b/fuzz/compose/target.c index 69b434e..a7f15c1 100644 --- a/fuzz/compose/target.c +++ b/fuzz/compose/target.c @@ -3,6 +3,7 @@ * * Currently, just parses an input file, and hopefully doesn't crash or hang. */ +#include "config.h" #include <assert.h> diff --git a/fuzz/keymap/target.c b/fuzz/keymap/target.c index 3c5e5f7..e8c6fb5 100644 --- a/fuzz/keymap/target.c +++ b/fuzz/keymap/target.c @@ -3,6 +3,7 @@ * * Currently, just parses an input file, and hopefully doesn't crash or hang. */ +#include "config.h" #include <assert.h> diff --git a/meson.build b/meson.build index 2c6d8e3..efbf661 100644 --- a/meson.build +++ b/meson.build @@ -115,7 +115,6 @@ else message('C library does not support secure_getenv, using getenv instead') endif configure_file(output: 'config.h', configuration: configh_data) -add_project_arguments('-include', 'config.h', language: 'c') # Supports -Wl,--version-script? @@ -70,6 +70,8 @@ * ********************************************************/ +#include "config.h" + #include "utils.h" #include "atom.h" diff --git a/src/compose/parser.c b/src/compose/parser.c index 9468cf6..c1ec0f8 100644 --- a/src/compose/parser.c +++ b/src/compose/parser.c @@ -52,6 +52,8 @@ OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +#include "config.h" + #include <errno.h> #include "utils.h" diff --git a/src/compose/paths.c b/src/compose/paths.c index e9d43d7..f2a28b4 100644 --- a/src/compose/paths.c +++ b/src/compose/paths.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "utils.h" #include "paths.h" diff --git a/src/compose/state.c b/src/compose/state.c index 8657ff7..9c64eb4 100644 --- a/src/compose/state.c +++ b/src/compose/state.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "table.h" #include "utils.h" #include "keysym.h" diff --git a/src/compose/table.c b/src/compose/table.c index 5cd8415..cba577f 100644 --- a/src/compose/table.c +++ b/src/compose/table.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "utils.h" #include "table.h" #include "parser.h" diff --git a/src/context-priv.c b/src/context-priv.c index 03324fd..dc85651 100644 --- a/src/context-priv.c +++ b/src/context-priv.c @@ -24,6 +24,8 @@ * Author: Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include <sys/types.h> #include <sys/stat.h> #include <errno.h> diff --git a/src/context.c b/src/context.c index 1ab0379..9fac0ab 100644 --- a/src/context.c +++ b/src/context.c @@ -24,6 +24,8 @@ * Author: Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include <sys/types.h> #include <sys/stat.h> #include <errno.h> diff --git a/src/keymap-priv.c b/src/keymap-priv.c index fffb2fd..8fdaf5b 100644 --- a/src/keymap-priv.c +++ b/src/keymap-priv.c @@ -24,6 +24,8 @@ * Author: Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include "keymap.h" static void diff --git a/src/keymap.c b/src/keymap.c index 859c64a..8e6cb67 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -50,6 +50,8 @@ * * ********************************************************/ +#include "config.h" + #include "keymap.h" #include "text.h" diff --git a/src/keysym-utf.c b/src/keysym-utf.c index c0e76f5..61e0a06 100644 --- a/src/keysym-utf.c +++ b/src/keysym-utf.c @@ -35,6 +35,8 @@ * */ +#include "config.h" + #include "xkbcommon/xkbcommon.h" #include "utils.h" #include "utf8.h" diff --git a/src/keysym.c b/src/keysym.c index 6c7975e..7b492e2 100644 --- a/src/keysym.c +++ b/src/keysym.c @@ -47,6 +47,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <stdlib.h> #include "xkbcommon/xkbcommon.h" #include "utils.h" diff --git a/src/state.c b/src/state.c index 4b601b7..2d07be4 100644 --- a/src/state.c +++ b/src/state.c @@ -59,6 +59,8 @@ * - messages (very unlikely) */ +#include "config.h" + #include "keymap.h" #include "keysym.h" #include "utf8.h" @@ -24,6 +24,8 @@ * ********************************************************/ +#include "config.h" + #include "keymap.h" #include "text.h" @@ -24,6 +24,8 @@ * Author: Rob Bradford <rob@linux.intel.com> */ +#include "config.h" + #include <stddef.h> #include <stdbool.h> #include <inttypes.h> diff --git a/src/utils.c b/src/utils.c index a981a41..dbb0662 100644 --- a/src/utils.c +++ b/src/utils.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "utils.h" #ifdef HAVE_MMAP diff --git a/src/x11/keymap.c b/src/x11/keymap.c index 701b614..7369d5d 100644 --- a/src/x11/keymap.c +++ b/src/x11/keymap.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "x11-priv.h" /* diff --git a/src/x11/state.c b/src/x11/state.c index da7dcc2..d111880 100644 --- a/src/x11/state.c +++ b/src/x11/state.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "x11-priv.h" static bool diff --git a/src/x11/util.c b/src/x11/util.c index b709bf2..3959a5a 100644 --- a/src/x11/util.c +++ b/src/x11/util.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "x11-priv.h" XKB_EXPORT int diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c index f99a850..605f159 100644 --- a/src/xkbcomp/action.c +++ b/src/xkbcomp/action.c @@ -51,6 +51,8 @@ * Ran Benita <ran234@gmail.com> */ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "expr.h" diff --git a/src/xkbcomp/ast-build.c b/src/xkbcomp/ast-build.c index c2f095d..7ee13d0 100644 --- a/src/xkbcomp/ast-build.c +++ b/src/xkbcomp/ast-build.c @@ -51,6 +51,8 @@ * Ran Benita <ran234@gmail.com> */ +#include "config.h" + #include "xkbcomp-priv.h" #include "ast-build.h" #include "include.h" diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c index cee962e..26b2bb7 100644 --- a/src/xkbcomp/compat.c +++ b/src/xkbcomp/compat.c @@ -47,6 +47,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "expr.h" diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c index 5e310db..dbdf734 100644 --- a/src/xkbcomp/expr.c +++ b/src/xkbcomp/expr.c @@ -24,6 +24,8 @@ * ********************************************************/ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "expr.h" diff --git a/src/xkbcomp/include.c b/src/xkbcomp/include.c index dc3f1e4..56b51cc 100644 --- a/src/xkbcomp/include.c +++ b/src/xkbcomp/include.c @@ -47,6 +47,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <errno.h> #include <limits.h> #include <stdio.h> diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c index 491da51..4b72d05 100644 --- a/src/xkbcomp/keycodes.c +++ b/src/xkbcomp/keycodes.c @@ -24,6 +24,8 @@ * ********************************************************/ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "expr.h" diff --git a/src/xkbcomp/keymap-dump.c b/src/xkbcomp/keymap-dump.c index 615d49e..e6b438a 100644 --- a/src/xkbcomp/keymap-dump.c +++ b/src/xkbcomp/keymap-dump.c @@ -49,6 +49,8 @@ * Author: Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c index e95e50c..0d14913 100644 --- a/src/xkbcomp/keymap.c +++ b/src/xkbcomp/keymap.c @@ -27,6 +27,8 @@ * Ran Benita <ran234@gmail.com> */ +#include "config.h" + #include "xkbcomp-priv.h" static void diff --git a/src/xkbcomp/keywords.c b/src/xkbcomp/keywords.c index abab7fe..3eec5ed 100644 --- a/src/xkbcomp/keywords.c +++ b/src/xkbcomp/keywords.c @@ -29,6 +29,7 @@ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." #endif +#include "config.h" #include "xkbcomp-priv.h" #include "parser-priv.h" diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y index 093151e..4838eaa 100644 --- a/src/xkbcomp/parser.y +++ b/src/xkbcomp/parser.y @@ -31,6 +31,8 @@ */ %{ +#include "config.h" + #include "xkbcomp/xkbcomp-priv.h" #include "xkbcomp/ast-build.h" #include "xkbcomp/parser-priv.h" diff --git a/src/xkbcomp/rules.c b/src/xkbcomp/rules.c index 5a2e1da..8d5c266 100644 --- a/src/xkbcomp/rules.c +++ b/src/xkbcomp/rules.c @@ -47,6 +47,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "xkbcomp-priv.h" #include "rules.h" #include "include.h" diff --git a/src/xkbcomp/scanner.c b/src/xkbcomp/scanner.c index 1ce6137..b70e5ca 100644 --- a/src/xkbcomp/scanner.c +++ b/src/xkbcomp/scanner.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "xkbcomp-priv.h" #include "parser-priv.h" #include "scanner-utils.h" diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c index 9efd90c..eb78412 100644 --- a/src/xkbcomp/symbols.c +++ b/src/xkbcomp/symbols.c @@ -51,6 +51,8 @@ * Ran Benita <ran234@gmail.com> */ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "expr.h" diff --git a/src/xkbcomp/types.c b/src/xkbcomp/types.c index e85b67e..3feaf41 100644 --- a/src/xkbcomp/types.c +++ b/src/xkbcomp/types.c @@ -24,6 +24,8 @@ * ********************************************************/ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "vmod.h" diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c index a0b029a..0e8ac12 100644 --- a/src/xkbcomp/vmod.c +++ b/src/xkbcomp/vmod.c @@ -24,6 +24,8 @@ * ********************************************************/ +#include "config.h" + #include "xkbcomp-priv.h" #include "text.h" #include "expr.h" diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c index 007e3f7..5655041 100644 --- a/src/xkbcomp/xkbcomp.c +++ b/src/xkbcomp/xkbcomp.c @@ -27,6 +27,8 @@ * Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include "xkbcomp-priv.h" #include "rules.h" diff --git a/test/atom.c b/test/atom.c index f196946..955b7da 100644 --- a/test/atom.c +++ b/test/atom.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <time.h> #include "test.h" diff --git a/test/buffercomp.c b/test/buffercomp.c index 5cc1dbc..12b67fe 100644 --- a/test/buffercomp.c +++ b/test/buffercomp.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/common.c b/test/common.c index f989818..40565e5 100644 --- a/test/common.c +++ b/test/common.c @@ -30,6 +30,8 @@ * Ran Benita <ran234@gmail.com> */ +#include "config.h" + #include <limits.h> #include <fcntl.h> #include <unistd.h> diff --git a/test/compose.c b/test/compose.c index d9f3629..89b0e7e 100644 --- a/test/compose.c +++ b/test/compose.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "xkbcommon/xkbcommon-compose.h" #include "test.h" diff --git a/test/context.c b/test/context.c index 8cb0a47..150491b 100644 --- a/test/context.c +++ b/test/context.c @@ -23,6 +23,8 @@ * Author: Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include "test.h" #include "context.h" diff --git a/test/filecomp.c b/test/filecomp.c index 39b7ac7..827a19c 100644 --- a/test/filecomp.c +++ b/test/filecomp.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "test.h" static int diff --git a/test/interactive-evdev.c b/test/interactive-evdev.c index b0b9e62..edf3919 100644 --- a/test/interactive-evdev.c +++ b/test/interactive-evdev.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <dirent.h> #include <errno.h> #include <fcntl.h> diff --git a/test/interactive-wayland.c b/test/interactive-wayland.c index e033728..736d03e 100644 --- a/test/interactive-wayland.c +++ b/test/interactive-wayland.c @@ -23,6 +23,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <errno.h> #include <fcntl.h> #include <locale.h> diff --git a/test/interactive-x11.c b/test/interactive-x11.c index 9829cf3..f279dd0 100644 --- a/test/interactive-x11.c +++ b/test/interactive-x11.c @@ -21,13 +21,15 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <locale.h> +#include <xcb/xkb.h> + #include "xkbcommon/xkbcommon-x11.h" #include "test.h" -#include <xcb/xkb.h> - /* * Note: This program only handles the core keyboard device for now. * It should be straigtforward to change struct keyboard to a list of diff --git a/test/keymap.c b/test/keymap.c index b736fe1..75b92c1 100644 --- a/test/keymap.c +++ b/test/keymap.c @@ -23,6 +23,8 @@ * Author: Mike Blumenkrantz <zmike@osg.samsung.com> */ +#include "config.h" + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/keyseq.c b/test/keyseq.c index 7be8598..adf4de3 100644 --- a/test/keyseq.c +++ b/test/keyseq.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "evdev-scancodes.h" #include "test.h" diff --git a/test/keysym.c b/test/keysym.c index e5347dd..2a8ca90 100644 --- a/test/keysym.c +++ b/test/keysym.c @@ -20,6 +20,8 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <locale.h> #include "test.h" @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "test.h" #include "context.h" diff --git a/test/print-compiled-keymap.c b/test/print-compiled-keymap.c index 6829eac..64c1915 100644 --- a/test/print-compiled-keymap.c +++ b/test/print-compiled-keymap.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <unistd.h> #include "test.h" diff --git a/test/rmlvo-to-kccgst.c b/test/rmlvo-to-kccgst.c index 99e5064..11319a4 100644 --- a/test/rmlvo-to-kccgst.c +++ b/test/rmlvo-to-kccgst.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <unistd.h> #include <getopt.h> diff --git a/test/rmlvo-to-keymap.c b/test/rmlvo-to-keymap.c index c7b5dbd..3a98527 100644 --- a/test/rmlvo-to-keymap.c +++ b/test/rmlvo-to-keymap.c @@ -21,6 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" #include <assert.h> #include <errno.h> @@ -29,6 +30,7 @@ #include <stdbool.h> #include <stdlib.h> #include <string.h> + #include "xkbcommon/xkbcommon.h" static bool print = false; diff --git a/test/rules-file-includes.c b/test/rules-file-includes.c index bdeb03a..006449c 100644 --- a/test/rules-file-includes.c +++ b/test/rules-file-includes.c @@ -22,6 +22,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" #include "test-config.h" #include "test.h" diff --git a/test/rules-file.c b/test/rules-file.c index b32009e..d217ba9 100644 --- a/test/rules-file.c +++ b/test/rules-file.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "test.h" #include "xkbcomp/xkbcomp-priv.h" #include "xkbcomp/rules.h" diff --git a/test/rulescomp.c b/test/rulescomp.c index 67ffcb8..eddf306 100644 --- a/test/rulescomp.c +++ b/test/rulescomp.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "evdev-scancodes.h" #include "test.h" diff --git a/test/state.c b/test/state.c index 1f2c75d..3ec7c66 100644 --- a/test/state.c +++ b/test/state.c @@ -23,6 +23,8 @@ * Author: Daniel Stone <daniel@fooishbar.org> */ +#include "config.h" + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/stringcomp.c b/test/stringcomp.c index 1a1813b..0388404 100644 --- a/test/stringcomp.c +++ b/test/stringcomp.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/test/utf8.c b/test/utf8.c index 1d1c073..214e356 100644 --- a/test/utf8.c +++ b/test/utf8.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <assert.h> #include <inttypes.h> #include <stdbool.h> @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include "test.h" #include "xkbcommon/xkbcommon-x11.h" diff --git a/test/x11comp.c b/test/x11comp.c index 8da2753..5fd064b 100644 --- a/test/x11comp.c +++ b/test/x11comp.c @@ -21,6 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ +#include "config.h" + #include <stdio.h> #include <spawn.h> #include <unistd.h> |