From 449ed2b8e83121ac8c322f15ca494ee7e4c4331a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 13 Jul 2020 12:28:43 +1000 Subject: tools: drop getopt vs getopt_long differentiation On all platforms we build on where getopt.h is available, getopt_long is also available. Only Windows doesn't have either but that's no reason for us to differentiate between the two. If we need to special-case getopt vs getopt_long, it's probably better to implement our own cross-platform version of it and use that. Fixes #161 Signed-off-by: Peter Hutterer --- tools/xkbcli.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tools') diff --git a/tools/xkbcli.c b/tools/xkbcli.c index fe6b6b5..78a9aa5 100644 --- a/tools/xkbcli.c +++ b/tools/xkbcli.c @@ -82,7 +82,6 @@ main(int argc, char **argv) while (1) { int c; -#if HAVE_GETOPT_LONG static struct option opts[] = { { "help", no_argument, 0, OPT_HELP }, { "version", no_argument, 0, OPT_VERSION }, @@ -90,9 +89,6 @@ main(int argc, char **argv) }; c = getopt_long(argc, argv, "+hV", opts, &option_index); -#else - c = getopt(argc, argv, "+hV"); -#endif if (c == -1) break; -- cgit v1.2.1