summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-07-13 12:28:43 +1000
committerRan Benita <ran@unusedvar.com>2020-07-25 11:05:14 +0300
commit449ed2b8e83121ac8c322f15ca494ee7e4c4331a (patch)
treed9a9b7e0f17b786ceec2d1fee5357754eae5a281 /tools
parent7d36a3d119826d80e48f397eb070a798f641423e (diff)
downloadxorg-lib-libxkbcommon-449ed2b8e83121ac8c322f15ca494ee7e4c4331a.tar.gz
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/xkbcli.c4
1 files changed, 0 insertions, 4 deletions
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;