From d7dcc4f38b137cc73791a5e4cce47cccd5527657 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Thu, 27 Sep 2012 20:49:22 +0200 Subject: [PATCH] Don't say -h is invalid whereas it is supported. getopt_long(3) was reporting "ninja: invalid option -- h" when "ninja -h" was called. Regression most probably introduced by 5fdb12ed5cec4e1c853c64026142d088ff5519e1 --- src/ninja.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ninja.cc b/src/ninja.cc index 6046d72..76b2764 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -740,7 +740,7 @@ int NinjaMain(int argc, char** argv) { int opt; while (tool_name.empty() && - (opt = getopt_long(argc, argv, "d:f:j:k:l:nt:vC:", kLongOptions, + (opt = getopt_long(argc, argv, "d:f:j:k:l:nt:vC:h", kLongOptions, NULL)) != -1) { switch (opt) { case 'd': -- 2.7.4