* mdocml: Allow compilation on Mac OS X, which doesn't have MACHINE
@ 2015-03-06 9:25 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2015-03-06 9:25 UTC (permalink / raw)
To: source
Log Message:
-----------
Allow compilation on Mac OS X, which doesn't have MACHINE defined.
While there, specify some casts to satisfy the compiler warnings.
OK schwarze@
Modified Files:
--------------
mdocml:
main.c
preconv.c
Revision Data
-------------
Index: preconv.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/preconv.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lpreconv.c -Lpreconv.c -u -p -r1.13 -r1.14
--- preconv.c
+++ preconv.c
@@ -33,7 +33,7 @@ preconv_encode(struct buf *ib, size_t *i
int nby;
unsigned int accum;
- cu = ib->buf + *ii;
+ cu = (unsigned char *)ib->buf + *ii;
assert(*cu & 0x80);
if ( ! (*filenc & MPARSE_UTF8))
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/main.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -Lmain.c -Lmain.c -u -p -r1.222 -r1.223
--- main.c
+++ 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;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-03-06 9:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06 9:25 mdocml: Allow compilation on Mac OS X, which doesn't have MACHINE kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).