Date: Tue, 25 Jan 2011 12:38:16 +0100 (CET) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/154283: [ patch ] x11-wm/fvwm95 a)not ready for amd64, b)undeclared conflict with x11-wm/fvwm2 and x11-wm/fvwm2-devel Message-ID: <201101251138.p0PBcFGq070099@m8-64.freebsd.cz> Resent-Message-ID: <201101251140.p0PBe6HN094970@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <string.h> 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 <stdlib.h> #include <stdio.h> +#include <string.h> #include <X11/Xlib.h> #include <fvwm/fvwmlib.h> --- 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 <string.h> #include <sys/time.h> +#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 <FVWMconfig.h> #include <stdio.h> +#include <stdlib.h> #include <signal.h> #include <string.h> #include <X11/Xos.h> --- 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 <stdlib.h> #include <stdio.h> +#include <string.h> #include <X11/Xlib.h> #include <fvwm/fvwmlib.h> --- 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 <string.h> #include <X11/Xlib.h> #include <fvwm/fvwmlib.h> --- 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 <sys/select.h> #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 <stdio.h> +#include <string.h> #include <ctype.h> /*********************************************************************** --- 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 <stdio.h> +#include <string.h> #include <ctype.h> /************************************************************************ * --- 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 <FVWMconfig.h> +#include <string.h> #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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101251138.p0PBcFGq070099>