$NetBSD: patch-ba,v 1.1 2005/10/17 19:45:18 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 +#include #include "rts.h" @@ -24,7 +25,7 @@ mpd_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 @@ mpd_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*/