aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit9b1e1a0a8be9129fdf6fcb1a222a78db07fd59e5 (patch)
treeb18287b853017169cc9c4add667f5faaf069d264 /main.c
parent06e2b6adb28e524b28426087cee444a5c4e24b3d (diff)
downloadmandoc-9b1e1a0a8be9129fdf6fcb1a222a78db07fd59e5.tar.gz
mandoc-9b1e1a0a8be9129fdf6fcb1a222a78db07fd59e5.tar.zst
mandoc-9b1e1a0a8be9129fdf6fcb1a222a78db07fd59e5.zip
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index 236c3c88..c5569f61 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.222 2015/02/27 16:02:10 schwarze Exp $ */
+/* $Id: main.c,v 1.223 2015/03/06 09:24:59 kristaps Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;