summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2015-03-06 09:24:59 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2015-03-06 09:24:59 +0000
commit2479665885291314c674c00adaea2c9589d68e84 (patch)
tree876a7d8bf37a5039c0dc87e886eb8859eeea8974 /main.c
parente416cc264f516dffda5d5702bbeecd388646bd27 (diff)
downloadmandoc-2479665885291314c674c00adaea2c9589d68e84.tar.gz
Allow compilation on Mac OS X, which doesn't have MACHINE defined.
While there, specify some casts to satisfy the compiler warnings. OK schwarze@
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index be0a9807..36cae8cd 100644
--- a/main.c
+++ b/main.c
@@ -303,18 +303,20 @@ main(int argc, char *argv[])
argc = 1;
}
} else if (argc > 1 &&
- ((uc = argv[0]) != NULL) &&
+ ((uc = (unsigned char *)argv[0]) != NULL) &&
((isdigit(uc[0]) && (uc[1] == '\0' ||
(isalpha(uc[1]) && uc[2] == '\0'))) ||
(uc[0] == 'n' && uc[1] == '\0'))) {
- search.sec = uc;
+ search.sec = (char *)uc;
argv++;
argc--;
}
if (search.arch == NULL)
search.arch = getenv("MACHINE");
+#ifdef MACHINE
if (search.arch == NULL)
search.arch = MACHINE;
+#endif
}
rc = MANDOCLEVEL_OK;