summaryrefslogtreecommitdiffstats
path: root/src/getopt.c
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-09-18 23:08:25 (GMT)
committerNico Weber <thakis@chromium.org>2014-09-18 23:09:20 (GMT)
commitac047b1f7efe3e90c2759864b57fd7c0d9404313 (patch)
tree22393d34d3ae63cf375841e127a02b8d89cdf65d /src/getopt.c
parentff2739b118ca8a3c2e0f2709a2852acced0d8407 (diff)
downloadNinja-ac047b1f7efe3e90c2759864b57fd7c0d9404313.zip
Ninja-ac047b1f7efe3e90c2759864b57fd7c0d9404313.tar.gz
Ninja-ac047b1f7efe3e90c2759864b57fd7c0d9404313.tar.bz2
Fix building tests on Windows again.
Turns out gtest was pulling in sys/stat.h, and we were using stat() through that in tests. This doesn't work with old MSVCs, so we should probably replace that with RealDiskInterface in a follow-up.
Diffstat (limited to 'src/getopt.c')
-rw-r--r--src/getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/getopt.c b/src/getopt.c
index 75ef99c..3350fb9 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -299,7 +299,7 @@ getopt_internal (int argc, char **argv, char *shortopts,
return (optopt = '?');
}
has_arg = ((cp[1] == ':')
- ? ((cp[2] == ':') ? OPTIONAL_ARG : REQUIRED_ARG) : no_argument);
+ ? ((cp[2] == ':') ? OPTIONAL_ARG : required_argument) : no_argument);
possible_arg = argv[optind] + optwhere + 1;
optopt = *cp;
}
@@ -318,7 +318,7 @@ getopt_internal (int argc, char **argv, char *shortopts,
else
optarg = NULL;
break;
- case REQUIRED_ARG:
+ case required_argument:
if (*possible_arg == '=')
possible_arg++;
if (*possible_arg != '\0')