diff options
author | dholland <dholland@pkgsrc.org> | 2017-09-10 01:00:01 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2017-09-10 01:00:01 +0000 |
commit | 361ea36f3d37cf541919a491cf7df1ac12ebe0b4 (patch) | |
tree | 1fe1fee3e2e58cb52006ab7c715ef18734f46350 /misc | |
parent | a77c2e12a59f710841dcaf77071e40d8c15e4923 (diff) | |
download | pkgsrc-361ea36f3d37cf541919a491cf7df1ac12ebe0b4.tar.gz |
Signedness fixes to make it build again with clang.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/window/Makefile | 4 | ||||
-rw-r--r-- | misc/window/distinfo | 8 | ||||
-rw-r--r-- | misc/window/patches/patch-ww.h | 25 | ||||
-rw-r--r-- | misc/window/patches/patch-wwframe.c | 28 | ||||
-rw-r--r-- | misc/window/patches/patch-wwlabel.c | 16 | ||||
-rw-r--r-- | misc/window/patches/patch-wwopen.c | 25 | ||||
-rw-r--r-- | misc/window/patches/patch-wwsize.c | 34 | ||||
-rw-r--r-- | misc/window/patches/patch-wwunframe.c | 16 |
8 files changed, 153 insertions, 3 deletions
diff --git a/misc/window/Makefile b/misc/window/Makefile index 5823dba85f4..fdd25ea7634 100644 --- a/misc/window/Makefile +++ b/misc/window/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2015/08/18 07:31:14 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2017/09/10 01:00:01 dholland Exp $ DISTNAME= window-20120215 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/misc/window/distinfo b/misc/window/distinfo index edc70ca4ce1..f84981146e0 100644 --- a/misc/window/distinfo +++ b/misc/window/distinfo @@ -1,6 +1,12 @@ -$NetBSD: distinfo,v 1.3 2015/11/03 23:49:54 agc Exp $ +$NetBSD: distinfo,v 1.4 2017/09/10 01:00:01 dholland Exp $ SHA1 (window-20120215.tar.gz) = 95e2f3376e101d014fa07e1e6f9a7129ccf51755 RMD160 (window-20120215.tar.gz) = 34d2f8bad158a419387a4d6f7fa977f65d54ab9b SHA512 (window-20120215.tar.gz) = 95e67c3d16b54f936f018b9a80c1007da90b97445784c51c436ae38f3edde4eaa37f6fc49bcb0b15601f4c2663fa01592b7208f737632e11e0c4abbf88f318ba Size (window-20120215.tar.gz) = 84798 bytes +SHA1 (patch-ww.h) = 19281574830d256c7e2f80b12a176f07c56beb8e +SHA1 (patch-wwframe.c) = 81fe73d55e81e0b5f8f7803068688994d71fe714 +SHA1 (patch-wwlabel.c) = a7a72a85720822d1388f31b107432a074b1a260e +SHA1 (patch-wwopen.c) = fae54637e369bc2cade2e30b7637e851b0c0649c +SHA1 (patch-wwsize.c) = 4815a61b0c6f17fc5be95b14ab60e7ca02b03a24 +SHA1 (patch-wwunframe.c) = 59b7376002224dfea90d43b33fbb2782edfd731a diff --git a/misc/window/patches/patch-ww.h b/misc/window/patches/patch-ww.h new file mode 100644 index 00000000000..84a9a5e09d0 --- /dev/null +++ b/misc/window/patches/patch-ww.h @@ -0,0 +1,25 @@ +$NetBSD: patch-ww.h,v 1.1 2017/09/10 01:00:01 dholland Exp $ + +Signedness fixes: the sign bit of fmap is used in bit operations and +causes compiler warnings and build failures, so make it unsigned. + +--- ww.h~ 2011-09-06 18:46:21.000000000 +0000 ++++ ww.h +@@ -104,7 +104,7 @@ struct ww { + /* arrays */ + char **ww_win; /* the window */ + union ww_char **ww_buf; /* the buffer */ +- char **ww_fmap; /* map for frame and box windows */ ++ unsigned char **ww_fmap; /* map for frame and box windows */ + short *ww_nvis; /* how many ww_buf chars are visible per row */ + + /* information for wwwrite() and company */ +@@ -341,7 +341,7 @@ const char * + wwerror(void); + void wwflush(void); + void wwframe(struct ww *, struct ww *); +-void wwframec(struct ww *, int, int, char); ++void wwframec(struct ww *, int, int, unsigned char); + void wwfree(char **, int); + int wwgetpty(struct ww *); + int wwgettty(int, struct ww_tty *); diff --git a/misc/window/patches/patch-wwframe.c b/misc/window/patches/patch-wwframe.c new file mode 100644 index 00000000000..e69d46d03d3 --- /dev/null +++ b/misc/window/patches/patch-wwframe.c @@ -0,0 +1,28 @@ +$NetBSD: patch-wwframe.c,v 1.1 2017/09/10 01:00:01 dholland Exp $ + +Signedness fixes: the sign bit of fmap is used in bit operations and +causes compiler warnings and build failures, so make it unsigned. + +--- wwframe.c~ 2003-08-07 11:17:39.000000000 +0000 ++++ wwframe.c +@@ -194,9 +194,9 @@ wwframe(struct ww *w, struct ww *wframe) + } + + void +-wwframec(struct ww *f, int r, int c, char code) ++wwframec(struct ww *f, int r, int c, unsigned char code) + { +- char oldcode; ++ unsigned char oldcode; + unsigned char *smap; + + if (r < f->ww_i.t || r >= f->ww_i.b || c < f->ww_i.l || c >= f->ww_i.r) +@@ -216,7 +216,7 @@ wwframec(struct ww *f, int r, int c, cha + } + + if (f->ww_fmap != 0) { +- char *fmap; ++ unsigned char *fmap; + + fmap = &f->ww_fmap[r][c]; + oldcode = *fmap; diff --git a/misc/window/patches/patch-wwlabel.c b/misc/window/patches/patch-wwlabel.c new file mode 100644 index 00000000000..cb8f9e36e59 --- /dev/null +++ b/misc/window/patches/patch-wwlabel.c @@ -0,0 +1,16 @@ +$NetBSD: patch-wwlabel.c,v 1.1 2017/09/10 01:00:01 dholland Exp $ + +Signedness fixes: the sign bit of fmap is used in bit operations and +causes compiler warnings and build failures, so make it unsigned. + +--- wwlabel.c~ 2009-04-14 08:50:06.000000000 +0000 ++++ wwlabel.c +@@ -58,7 +58,7 @@ wwlabel(struct ww *w, struct ww *f, int + char *win; + union ww_char *buf; + union ww_char *ns; +- char *fmap; ++ unsigned char *fmap; + unsigned char *smap; + char touched; + const char *p; diff --git a/misc/window/patches/patch-wwopen.c b/misc/window/patches/patch-wwopen.c new file mode 100644 index 00000000000..50e17ccde16 --- /dev/null +++ b/misc/window/patches/patch-wwopen.c @@ -0,0 +1,25 @@ +$NetBSD: patch-wwopen.c,v 1.1 2017/09/10 01:00:01 dholland Exp $ + +Signedness fixes: the sign bit of fmap is used in bit operations and +causes compiler warnings and build failures, so make it unsigned. + +--- wwopen.c~ 2003-08-07 11:17:42.000000000 +0000 ++++ wwopen.c +@@ -147,7 +147,7 @@ wwopen(int type, int oflags, int nrow, i + w->ww_win[i][j] = m; + + if (oflags & WWO_FRAME) { +- w->ww_fmap = wwalloc(w->ww_w.t, w->ww_w.l, ++ w->ww_fmap = (unsigned char **)wwalloc(w->ww_w.t, w->ww_w.l, + w->ww_w.nr, w->ww_w.nc, sizeof (char)); + if (w->ww_fmap == 0) + goto bad; +@@ -184,7 +184,7 @@ bad: + if (w->ww_win != 0) + wwfree(w->ww_win, w->ww_w.t); + if (w->ww_fmap != 0) +- wwfree(w->ww_fmap, w->ww_w.t); ++ wwfree((char **)w->ww_fmap, w->ww_w.t); + if (w->ww_buf != 0) + wwfree((char **)w->ww_buf, w->ww_b.t); + if (w->ww_nvis != 0) diff --git a/misc/window/patches/patch-wwsize.c b/misc/window/patches/patch-wwsize.c new file mode 100644 index 00000000000..b3cd299cc14 --- /dev/null +++ b/misc/window/patches/patch-wwsize.c @@ -0,0 +1,34 @@ +$NetBSD: patch-wwsize.c,v 1.1 2017/09/10 01:00:01 dholland Exp $ + +Signedness fixes: the sign bit of fmap is used in bit operations and +causes compiler warnings and build failures, so make it unsigned. + +--- wwsize.c.orig 2006-05-02 22:24:05.000000000 +0000 ++++ wwsize.c +@@ -55,7 +55,7 @@ wwsize(struct ww *w, int nrow, int ncol) + union ww_char **buf = 0; + char **win = 0; + short *nvis = 0; +- char **fmap = 0; ++ unsigned char **fmap = 0; + char m; + + /* +@@ -65,7 +65,7 @@ wwsize(struct ww *w, int nrow, int ncol) + if (win == 0) + goto bad; + if (w->ww_fmap != 0) { +- fmap = wwalloc(w->ww_w.t, w->ww_w.l, nrow, ncol, sizeof (char)); ++ fmap = (unsigned char **)wwalloc(w->ww_w.t, w->ww_w.l, nrow, ncol, sizeof (char)); + if (fmap == 0) + goto bad; + } +@@ -186,7 +186,7 @@ bad: + if (win != 0) + wwfree(win, w->ww_w.t); + if (fmap != 0) +- wwfree(fmap, w->ww_w.t); ++ wwfree((char **)fmap, w->ww_w.t); + if (buf != 0) + wwfree((char **)buf, w->ww_b.t); + return -1; diff --git a/misc/window/patches/patch-wwunframe.c b/misc/window/patches/patch-wwunframe.c new file mode 100644 index 00000000000..83a67112e63 --- /dev/null +++ b/misc/window/patches/patch-wwunframe.c @@ -0,0 +1,16 @@ +$NetBSD: patch-wwunframe.c,v 1.1 2017/09/10 01:00:01 dholland Exp $ + +Signedness fixes: the sign bit of fmap is used in bit operations and +causes compiler warnings and build failures, so make it unsigned. + +--- wwunframe.c~ 2003-08-07 11:17:46.000000000 +0000 ++++ wwunframe.c +@@ -51,7 +51,7 @@ wwunframe(struct ww *w) + for (i = w->ww_i.t; i < w->ww_i.b; i++) { + int j; + char *win = w->ww_win[i]; +- char *fmap = w->ww_fmap ? w->ww_fmap[i] : 0; ++ unsigned char *fmap = w->ww_fmap ? w->ww_fmap[i] : 0; + unsigned char *smap = wwsmap[i]; + union ww_char *ns = wwns[i]; + int nchanged = 0; |