diff options
author | Ran Benita <ran@unusedvar.com> | 2019-12-28 13:49:40 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2019-12-28 13:49:40 +0200 |
commit | da4a90c13e03d5a8684c66e7e8e69b174af822a0 (patch) | |
tree | 3a720ab5b8c6009578d838945ed6fdf50c67d1c3 /test | |
parent | fe417d841e838adfd57f591ea27bd34a999eeb77 (diff) | |
download | xorg-lib-libxkbcommon-da4a90c13e03d5a8684c66e7e8e69b174af822a0.tar.gz |
Open files in binary mode
This turns off some misfeatures on Windows, and does nothing on POSIX.
Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/common.c | 2 | ||||
-rw-r--r-- | test/compose.c | 4 | ||||
-rw-r--r-- | test/interactive-evdev.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/common.c b/test/common.c index 1a56521..3784d8b 100644 --- a/test/common.c +++ b/test/common.c @@ -270,7 +270,7 @@ test_compile_file(struct xkb_context *context, const char *path_rel) if (!path) return NULL; - file = fopen(path, "r"); + file = fopen(path, "rb"); if (!file) { fprintf(stderr, "Failed to open path: %s\n", path); free(path); diff --git a/test/compose.c b/test/compose.c index 89b0e7e..37d33bb 100644 --- a/test/compose.c +++ b/test/compose.c @@ -180,7 +180,7 @@ test_seqs(struct xkb_context *ctx) FILE *file; path = test_get_path("compose/en_US.UTF-8/Compose"); - file = fopen(path, "r"); + file = fopen(path, "rb"); assert(file); free(path); @@ -354,7 +354,7 @@ test_state(struct xkb_context *ctx) FILE *file; path = test_get_path("compose/en_US.UTF-8/Compose"); - file = fopen(path, "r"); + file = fopen(path, "rb"); assert(file); free(path); diff --git a/test/interactive-evdev.c b/test/interactive-evdev.c index edf3919..79da5ec 100644 --- a/test/interactive-evdev.c +++ b/test/interactive-evdev.c @@ -445,7 +445,7 @@ main(int argc, char *argv[]) } if (keymap_path) { - FILE *file = fopen(keymap_path, "r"); + FILE *file = fopen(keymap_path, "rb"); if (!file) { ret = EXIT_FAILURE; fprintf(stderr, "Couldn't open '%s': %s\n", |