Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / mpd / patches / patch-ba
blobd441ca5564128d806f8a8e9fe02d4fa0714b72d8
1 $NetBSD: patch-ba,v 1.1 2005/03/02 14:07:39 is Exp $
3 --- rts/misc.c.orig     2005-03-02 13:56:52.000000000 +0000
4 +++ rts/misc.c
5 @@ -1,6 +1,7 @@
6  /*  misc.c -- miscellaneous routines supporting the generated code  */
7  
8  #include <stdarg.h>
9 +#include <stdint.h>
10  #include "rts.h"
13 @@ -24,7 +25,7 @@ mpd_cat (String *slist, ...)
14      n = 0;                                     /* total the string lengths */
15      va_start (ap, slist);
16      for (s = slist; s != NULL; s = va_arg (ap, String *)) 
17 -       if ((int) s & 1)
18 +       if ((intptr_t) s & 1)
19             n++;                                /* char argument */
20         else
21             n += s->length;                     /* String argument */
22 @@ -37,8 +38,8 @@ mpd_cat (String *slist, ...)
23      p = DATA (t);
24      va_start (ap, slist);
25      for (s = slist; s != NULL; s = va_arg (ap, String *))
26 -       if ((int) s & 1) {                      /* for each input string: */
27 -           *p++ = (int) s >> 2;                    /* copy in char argument */
28 +       if ((intptr_t) s & 1) {                 /* for each input string: */
29 +           *p++ = (intptr_t) s >> 2;               /* copy in char argument */
30         } else {
31             memcpy (p, DATA (s), s->length);        /* copy into new string */
32             p += s->length;                         /* advance pointer*/