summaryrefslogtreecommitdiff
path: root/lang/sr/patches/patch-ba
blob: 7ed7070cdab4f424637e1a8151e2484580f95121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-ba,v 1.1 2005/03/02 14:07:39 is Exp $

--- rts/misc.c.orig	2005-03-02 13:56:52.000000000 +0000
+++ rts/misc.c
@@ -1,6 +1,7 @@
 /*  misc.c -- miscellaneous routines supporting the generated code  */
 
 #include <stdarg.h>
+#include <stdint.h>
 #include "rts.h"
 
 
@@ -24,7 +25,7 @@ sr_cat (String *slist, ...)
     n = 0;					/* total the string lengths */
     va_start (ap, slist);
     for (s = slist; s != NULL; s = va_arg (ap, String *)) 
-	if ((int) s & 1)
+	if ((intptr_t) s & 1)
 	    n++;				/* char argument */
 	else
 	    n += s->length;			/* String argument */
@@ -37,8 +38,8 @@ sr_cat (String *slist, ...)
     p = DATA (t);
     va_start (ap, slist);
     for (s = slist; s != NULL; s = va_arg (ap, String *))
-	if ((int) s & 1) {			/* for each input string: */
-	    *p++ = (int) s >> 2;		    /* copy in char argument */
+	if ((intptr_t) s & 1) {			/* for each input string: */
+	    *p++ = (intptr_t) s >> 2;		    /* copy in char argument */
 	} else {
 	    memcpy (p, DATA (s), s->length);	    /* copy into new string */
 	    p += s->length;			    /* advance pointer*/