From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jan 25 11:40:06 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C59106566C for ; Tue, 25 Jan 2011 11:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6FE8FC14 for ; Tue, 25 Jan 2011 11:40:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0PBe691094972 for ; Tue, 25 Jan 2011 11:40:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0PBe6HN094970; Tue, 25 Jan 2011 11:40:06 GMT (envelope-from gnats) Resent-Date: Tue, 25 Jan 2011 11:40:06 GMT Resent-Message-Id: <201101251140.p0PBe6HN094970@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F23106566C for ; Tue, 25 Jan 2011 11:38:22 +0000 (UTC) (envelope-from dan@m8-64.freebsd.cz) Received: from m8-64.freebsd.cz (m8-64.freebsd.cz [195.113.20.201]) by mx1.freebsd.org (Postfix) with ESMTP id 82CCF8FC14 for ; Tue, 25 Jan 2011 11:38:20 +0000 (UTC) Received: from m8-64.freebsd.cz (localhost [127.0.0.1]) by m8-64.freebsd.cz (8.14.4/8.14.4) with ESMTP id p0PBcGCV070100 for ; Tue, 25 Jan 2011 12:38:16 +0100 (CET) (envelope-from dan@m8-64.freebsd.cz) Received: (from root@localhost) by m8-64.freebsd.cz (8.14.4/8.14.4/Submit) id p0PBcFGq070099; Tue, 25 Jan 2011 12:38:16 +0100 (CET) (envelope-from dan) Message-Id: <201101251138.p0PBcFGq070099@m8-64.freebsd.cz> Date: Tue, 25 Jan 2011 12:38:16 +0100 (CET) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/154283: [ patch ] x11-wm/fvwm95 a)not ready for amd64, b)undeclared conflict with x11-wm/fvwm2 and x11-wm/fvwm2-devel X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Lukes List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2011 11:40:06 -0000 >Number: 154283 >Category: ports >Synopsis: [ patch ] x11-wm/fvwm95 a)not ready for amd64, b)undeclared conflict with x11-wm/fvwm2 and x11-wm/fvwm2-devel >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 25 11:40:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 8.1-RELEASE-p2 amd64 >Organization: Obludarium >Environment: x11-wm/fvwm95/Makefile,v 1.41 2008/07/06 17:09:09 >Description: a) Several *.c files in this project use strcpy/strlen/... suite of function without #include The implicit declaration of such functions works as long as sizeof(char *)==sizeof(int) It is not true on 64bit platform so program abends when hitting code like strcpy(*string,value) There are some other places where implicit declaration of function used, but function return pointer in implentation also - it also doesn't work properly when sizeof(void *)!=sizeof(int) b) Manual pages of x11-wm/fvwm95 conflicst with manual pages of x11-wm/fvwm2 and x11-wm/fvwm2-devel. Such conflict is not mentioned in Makefile The x11-wm/fvwm95 is very old and dirty code. >How-To-Repeat: >Fix: a) Most of problems can be solved by including string.h or via explicit declaration of function used with no declaration Yes, I know the fvwm95 is very old code and upstream project no longer exists, but unless we want to remove port from tree at all we should try to maintain them useable (despite I'm not user of this port). The attached patch correct fvwm95 to be useable on amd64 architecture, the i386 architecture should not be affected by it (with exception that several warnings during compilation will disappear) It may help (or not harm) on other architectures as well. b) Conflict with x11-wm/fvwm2 and x11-wm/fvwm2-devel needs to be declared in Makefile, e.g. CONFLICTS?= fvwm-1.* fvwm-2.* should be added just after .ifndef(NO_INSTALL_MANPAGES) line --- modules/FvwmTaskBar/ButtonArray.c.orig 2011-01-25 11:20:29.000000000 +0100 +++ modules/FvwmTaskBar/ButtonArray.c 2011-01-25 11:21:00.000000000 +0100 @@ -16,6 +16,7 @@ #include #include +#include #include #include --- modules/FvwmTaskBar/Mallocs.c.orig 1996-12-10 17:41:48.000000000 +0100 +++ modules/FvwmTaskBar/Mallocs.c 2011-01-25 11:24:01.000000000 +0100 @@ -25,6 +25,8 @@ #include #include +#include "Mallocs.h" + #ifdef BROKEN_SUN_HEADERS #include "../../fvwm/sun_headers.h" #endif @@ -57,6 +59,10 @@ if (value==NULL) return; if (*string==NULL) *string=(char *)safemalloc(strlen(value)+1); else *string=(char *)realloc(*string,strlen(value)+1); + if (*string == (char *)0) { + fprintf(stderr,"%s:UpdateString failed, not enought memory",Module); + exit(1); + } strcpy(*string,value); } --- xpmroot/xpmroot.c.orig 2011-01-25 11:28:06.000000000 +0100 +++ xpmroot/xpmroot.c 2011-01-25 11:28:22.000000000 +0100 @@ -9,6 +9,7 @@ #include #include +#include #include #include #include --- modules/FvwmWinList/ButtonArray.c.orig 2011-01-25 11:30:10.000000000 +0100 +++ modules/FvwmWinList/ButtonArray.c 2011-01-25 11:30:58.000000000 +0100 @@ -14,6 +14,7 @@ #include #include +#include #include #include --- modules/FvwmTaskBar/Start.c.orig 2011-01-25 11:32:17.000000000 +0100 +++ modules/FvwmTaskBar/Start.c 2011-01-25 11:32:49.000000000 +0100 @@ -1,5 +1,6 @@ /* Start ;-) button handling */ +#include #include #include --- modules/FvwmForm/FvwmForm.c.ORIG 2011-01-25 11:38:20.000000000 +0100 +++ modules/FvwmForm/FvwmForm.c 2011-01-25 11:44:19.000000000 +0100 @@ -31,6 +31,9 @@ #include #endif +//Missing declaration from libs/ : +XFontStruct *GetFontOrFixed(Display *disp, char *fontname); + void dummy () { } --- libs/SendInfo.c.orig 2011-01-25 11:50:05.000000000 +0100 +++ libs/SendInfo.c 2011-01-25 11:51:44.000000000 +0100 @@ -1,4 +1,5 @@ #include +#include #include /*********************************************************************** --- libs/SendText.c.orig 2011-01-25 11:50:51.000000000 +0100 +++ libs/SendText.c 2011-01-25 11:52:09.000000000 +0100 @@ -1,4 +1,5 @@ #include +#include #include /************************************************************************ * --- libs/hostname.c.orig 2011-01-25 11:51:12.000000000 +0100 +++ libs/hostname.c 2011-01-25 11:52:08.000000000 +0100 @@ -1,4 +1,5 @@ #include +#include #if HAVE_UNAME /* define mygethostname() by using uname() */ --- fvwm/icons.c.orig 2011-01-25 11:54:50.000000000 +0100 +++ fvwm/icons.c 2011-01-25 11:56:58.000000000 +0100 @@ -321,7 +321,7 @@ if(Tmp_win->flags & SUPPRESSICON) return; - if (Tmp_win->icon_w == (int)NULL) + if (Tmp_win->icon_w == 0) return; Tmp_win->icon_t_width = XTextWidth(Scr.IconFont.font,Tmp_win->icon_name, --- fvwm/module.c.orig 2011-01-25 11:58:00.000000000 +0100 +++ fvwm/module.c 2011-01-25 11:58:49.000000000 +0100 @@ -275,7 +275,7 @@ if(size >255) { fvwm_msg(ERR,"HandleModuleInput", - "Module command is too big (%d)",(void *)size); + "Module command is too big (%d)",size); size=255; } >Release-Note: >Audit-Trail: >Unformatted: