Date: Sat, 06 Feb 2010 01:35:22 +0100 From: Daniel Roethlisberger <daniel@roe.ch> To: FreeBSD-gnats-submit@FreeBSD.org Cc: daniel@roe.ch Subject: ports/143594: [patch] Unbreak x11-wm/wmii on amd64 and sparc64 Message-ID: <E1NdYdu-0002ed-VV@calvin.ustdmz.roe.ch> Resent-Message-ID: <201002060040.o160e1v7022148@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 143594 >Category: ports >Synopsis: [patch] Unbreak x11-wm/wmii on amd64 and sparc64 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Feb 06 00:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Daniel Roethlisberger >Release: FreeBSD 6.4-RELEASE-p7 i386 >Organization: >Environment: System: FreeBSD calvin.ustdmz.roe.ch 6.4-RELEASE-p7 FreeBSD 6.4-RELEASE-p7 #0: Fri Oct 2 02:46:10 UTC 2009 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/SMP i386 >Description: Unbreak wmii on 64 bit platforms (tested on RELENG_8_0/amd64). This patch adds three patch-* files to files/. >How-To-Repeat: >Fix: --- wmii-3.6-amd64-fix.diff begins here --- diff -ruN wmii.orig/Makefile wmii/Makefile --- wmii.orig/Makefile 2010-02-06 00:02:37.000000000 +0100 +++ wmii/Makefile 2010-02-06 00:03:54.000000000 +0100 @@ -56,10 +56,4 @@ ${REINPLACE_CMD} -e 's|^COMPILE=|& noisycc=yes| ; \ s|^LINK=|& noisycc=yes|' ${WRKSRC}/mk/hdr.mk -.include <bsd.port.pre.mk> - -.if ${ARCH} == "amd64" || ${ARCH} == "sparc64" -BROKEN= Does not compile on amd64 or sparc64 -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff -ruN wmii.orig/files/patch-cmd_util.c wmii/files/patch-cmd_util.c --- wmii.orig/files/patch-cmd_util.c 1970-01-01 01:00:00.000000000 +0100 +++ wmii/files/patch-cmd_util.c 2010-02-06 00:00:34.000000000 +0100 @@ -0,0 +1,30 @@ +--- cmd/util.c.orig 2007-11-16 14:59:15.000000000 +0100 ++++ cmd/util.c 2010-02-05 23:57:28.000000000 +0100 +@@ -61,12 +61,12 @@ + size /= 10; + } while(size > 0); + +- strlcat(buf, argv0, sizeof(buf)); +- strlcat(buf, couldnot, sizeof(buf)); +- strlcat(buf, name, sizeof(buf)); +- strlcat(buf, paren, sizeof(buf)); +- strlcat(buf, sizestr+i, sizeof(buf)); +- strlcat(buf, bytes, sizeof(buf)); ++ wmii_strlcat(buf, argv0, sizeof(buf)); ++ wmii_strlcat(buf, couldnot, sizeof(buf)); ++ wmii_strlcat(buf, name, sizeof(buf)); ++ wmii_strlcat(buf, paren, sizeof(buf)); ++ wmii_strlcat(buf, sizestr+i, sizeof(buf)); ++ wmii_strlcat(buf, bytes, sizeof(buf)); + write(2, buf, strlen(buf)); + + exit(1); +@@ -151,7 +151,7 @@ + } + + uint +-strlcat(char *dst, const char *src, uint size) { ++wmii_strlcat(char *dst, const char *src, uint size) { + const char *s; + char *d; + int n, len; diff -ruN wmii.orig/files/patch-cmd_wmii_client.c wmii/files/patch-cmd_wmii_client.c --- wmii.orig/files/patch-cmd_wmii_client.c 1970-01-01 01:00:00.000000000 +0100 +++ wmii/files/patch-cmd_wmii_client.c 2010-02-06 00:01:53.000000000 +0100 @@ -0,0 +1,22 @@ +--- cmd/wmii/client.c.orig 2007-11-16 14:59:15.000000000 +0100 ++++ cmd/wmii/client.c 2010-02-05 23:58:21.000000000 +0100 +@@ -883,7 +883,7 @@ + if(tags[n] == '+' || tags[n] == '-') + utflcpy(buf, c->tags, sizeof(c->tags)); + +- strlcat(buf, &tags[n], sizeof(buf)); ++ wmii_strlcat(buf, &tags[n], sizeof(buf)); + trim(buf, " \t/"); + + n = 0; +@@ -945,8 +945,8 @@ + for(i=0, n=0; i < j; i++) + if(n == 0 || strcmp(toks[i], toks[n-1])) { + if(i > 0) +- strlcat(c->tags, "+", sizeof(c->tags)); +- strlcat(c->tags, toks[i], sizeof(c->tags)); ++ wmii_strlcat(c->tags, "+", sizeof(c->tags)); ++ wmii_strlcat(c->tags, toks[i], sizeof(c->tags)); + toks[n++] = toks[i]; + } + toks[n] = nil; diff -ruN wmii.orig/files/patch-include_util.h wmii/files/patch-include_util.h --- wmii.orig/files/patch-include_util.h 1970-01-01 01:00:00.000000000 +0100 +++ wmii/files/patch-include_util.h 2010-02-05 23:59:45.000000000 +0100 @@ -0,0 +1,19 @@ +--- include/util.h.orig 2007-11-16 14:59:15.000000000 +0100 ++++ include/util.h 2010-02-05 23:59:07.000000000 +0100 +@@ -23,7 +23,6 @@ + typedef unsigned long long uvlong; + typedef long long vlong; + +-#define strlcat wmii_strlcat + /* util.c */ + uint tokenize(char *res[], uint reslen, char *str, char delim); + char *estrdup(const char *str); +@@ -35,7 +34,7 @@ + int min(int a, int b); + char *str_nil(char *s); + int utflcpy(char *to, const char *from, int l); +-uint strlcat(char *dst, const char *src, unsigned int siz); ++uint wmii_strlcat(char *dst, const char *src, unsigned int siz); + + char *argv0; + void *__p; --- wmii-3.6-amd64-fix.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1NdYdu-0002ed-VV>