From 2629b921025b85cbc85bc2db79c620dd8ca59a4e Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Wed, 29 Dec 2004 22:52:05 +0000 Subject: [PATCH] (main) [_WIN32]: enable command line options for WIN32. --- src/util/fairland.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/util/fairland.c b/src/util/fairland.c index e37dd878..c1436a54 100644 --- a/src/util/fairland.c +++ b/src/util/fairland.c @@ -67,6 +67,9 @@ static int quiet = 0; #if defined(aix) || defined(linux) || defined(solaris) #include #endif /* aix or linux */ +#if defined(_WIN32) +#include "../lib/gen/getopt.h" +#endif #include #include @@ -199,6 +202,7 @@ main(int argc, char *argv[]) rnd_seed = time(NULL); #if !defined(_WIN32) rnd_seed += getpid(); +#endif while ((opt = getopt(argc, argv, "ae:ioqs:R:")) != EOF) { switch (opt) { @@ -225,7 +229,6 @@ main(int argc, char *argv[]) break; } } -#endif SRANDOM(rnd_seed); if (config_file == NULL) { sprintf(tbuf, "%s/econfig", datadir); @@ -233,11 +236,7 @@ main(int argc, char *argv[]) } emp_config(config_file); -#if !defined(_WIN32) parse_args(argc - optind, argv + optind); -#else - parse_args(argc - 1, argv + 1); -#endif if (allocate_memory() == -1) exit(-1); print_vars();