source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Allow compilation on Mac OS X, which doesn't have MACHINE
Date: Fri, 6 Mar 2015 04:25:29 -0500 (EST)	[thread overview]
Message-ID: <4602795098368105437.enqueue@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2015-03-06  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4602795098368105437.enqueue@fantadrom.bsd.lv \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).