From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 4 00:50:03 2007 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 3B32316A420 for ; Sun, 4 Nov 2007 00:50:03 +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 1942713C4A5 for ; Sun, 4 Nov 2007 00:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lA40o2jt018843 for ; Sun, 4 Nov 2007 00:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lA40o2Fa018837; Sun, 4 Nov 2007 00:50:02 GMT (envelope-from gnats) Resent-Date: Sun, 4 Nov 2007 00:50:02 GMT Resent-Message-Id: <200711040050.lA40o2Fa018837@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, "\"Pietro Cerutti\" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5CD816A418 for ; Sun, 4 Nov 2007 00:42:41 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED9D13C4AC for ; Sun, 4 Nov 2007 00:42:41 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from 80-218-191-236.dclient.hispeed.ch ([80.218.191.236] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpa (Exim 4.63) (envelope-from ) id 1IoSys-0006w9-8f for FreeBSD-gnats-submit@freebsd.org; Sun, 04 Nov 2007 01:04:46 +0100 Received: from gahrtop.localhost (localhost [127.0.0.1]) by gahrtop.localhost (Postfix) with ESMTP id EC04F73062 for ; Sun, 4 Nov 2007 01:04:09 +0100 (CET) Message-Id: <1194134649.99726@gahrtop.localhost> Date: Sun, 4 Nov 2007 01:04:09 +0100 From: "\"Pietro Cerutti\" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.8 Cc: Subject: ports/117801: [patch] editors/dedit unbreak fix build with GCC 4.2 + general cleanup X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 00:50:03 -0000 >Number: 117801 >Category: ports >Synopsis: [patch] editors/dedit unbreak fix build with GCC 4.2 + general cleanup >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: Sun Nov 04 00:50:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Pietro Cerutti >Release: FreeBSD 6.2-STABLE i386 >Organization: Bern University of Applied Sciences >Environment: System: FreeBSD 6.2-STABLE #3: Wed Oct 24 08:30:39 CEST 2007 root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034 >Description: A "static declaration following non-static declaration" problem existed in editors/dedit's source. I took the chance to do some cleanup. Now the code compiles without warnings ;-) >How-To-Repeat: cd /usr/ports/editors/dedit && make >Fix: --- Makefile.orig 2007-11-04 00:58:39.000000000 +0100 +++ Makefile 2007-11-04 00:59:04.000000000 +0100 @@ -7,7 +7,7 @@ PORTNAME= dedit PORTVERSION= 0.6.2.3 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= editors gnome MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL} DISTNAME= ${PORTNAME}_${PORTVERSION} @@ -27,12 +27,6 @@ MAN1= dedit.1 MANLANG= "" ja -.include - -.if ${OSVERSION} >= 700042 -BROKEN= Broken with gcc 4.2 -.endif - pre-patch: @${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ 's|dedit.ja.1||' @@ -40,4 +34,4 @@ post-install: ${INSTALL_MAN} ${WRKSRC}/doc/dedit.ja.1 ${MANPREFIX}/man/ja/man1/dedit.1 -.include +.include --- /dev/null 2007-11-04 00:57:48.000000000 +0100 +++ files/patch-src-dedit.h 2007-11-04 00:36:23.000000000 +0100 @@ -0,0 +1,10 @@ +--- src/dedit.h.orig 2007-11-04 00:35:59.000000000 +0100 ++++ src/dedit.h 2007-11-04 00:36:08.000000000 +0100 +@@ -30,7 +30,6 @@ + extern GnomeMDI *DEmdi; + + extern gchar *print_cmd; +-extern gboolean restarted; + extern const struct poptOption options[]; + extern gint fs_code; + extern GtkWidget *file_sel; --- /dev/null 2007-11-04 00:57:48.000000000 +0100 +++ files/patch-src-file.c 2007-11-04 00:57:10.000000000 +0100 @@ -0,0 +1,46 @@ +--- src/file.c.orig 2000-10-13 08:45:02.000000000 +0200 ++++ src/file.c 2007-11-04 00:56:29.000000000 +0100 +@@ -46,7 +46,7 @@ + static void cancel_cb(GtkWidget *widget, gpointer *data); + + gint fs_code; +-static GtkWidget *file_sel; ++GtkWidget *file_sel; + + /* + * +@@ -80,7 +80,7 @@ + gtk_widget_destroy(GTK_WIDGET(file_sel)); + file_sel = NULL; + +- if(file_name) { ++ if(file_name[0]) { + dedit_new_document(NULL, file_name); + } + +@@ -318,7 +318,7 @@ + gtk_widget_destroy(GTK_WIDGET(file_sel)); + file_sel = NULL; + +- if(tmp){ ++ if(tmp[0]){ + save_file(doc, tmp); + } + +@@ -330,7 +330,6 @@ + { + gchar *tmp; + gint i; +- struct stat status; + gzFile *gzfp = NULL; + gboolean gzMode = FALSE; + FILE *fp = NULL; +@@ -340,7 +339,7 @@ + gchar backup[PATH_MAX]; + gboolean bkFlag = FALSE; + +- struct stat st0, st1; ++ struct stat st0; + + #ifdef TRACE_FUNC + printf("save_file()\n"); --- /dev/null 2007-11-04 00:57:48.000000000 +0100 +++ files/patch-src-jcode.c 2007-11-04 00:49:33.000000000 +0100 @@ -0,0 +1,46 @@ +--- src/jcode.c.orig 2000-10-13 08:45:02.000000000 +0200 ++++ src/jcode.c 2007-11-04 00:49:09.000000000 +0100 +@@ -251,7 +251,7 @@ + char * + kanji_conv_auto(char *str, const char *dstset) + { +- unsigned char *buf, *ret; ++ char *buf, *ret; + iconv_t cd; + size_t insize = 0; + size_t outsize = 0; +@@ -278,7 +278,7 @@ + break; + } + +- buf = (unsigned char *)malloc(strlen(str)* 4 + 1); ++ buf = malloc(strlen(str)* 4 + 1); + if(!buf) + return NULL; + +@@ -315,7 +315,6 @@ + { + static char *jpcode = NULL; + static char *locale_euc[] = { JCODE_LOCALE_EUC, NULL }; +- static char *locale_jis[] = { JCODE_LOCALE_JIS, NULL }; + static char *locale_sjis[] = { JCODE_LOCALE_SJIS, NULL }; + + static struct LOCALE_TABLE { +@@ -352,7 +351,7 @@ + char * + kanji_conv(char *str, const char *dstset, const char *srcset) + { +- unsigned char *buf, *ret; ++ char *buf, *ret; + iconv_t cd; + size_t insize = 0; + size_t outsize = 0; +@@ -363,7 +362,7 @@ + if(!str) + return NULL; + +- buf = (unsigned char *)malloc(strlen(str) * 4 + 1); ++ buf = malloc(strlen(str) * 4 + 1); + if(!buf) + return NULL; + --- /dev/null 2007-11-04 01:00:01.000000000 +0100 +++ files/patch-src-print.c 2007-11-04 00:39:06.000000000 +0100 @@ -0,0 +1,11 @@ +--- src/print.c.orig 2007-11-04 00:37:11.000000000 +0100 ++++ src/print.c 2007-11-04 00:38:50.000000000 +0100 +@@ -46,7 +46,7 @@ + static GtkWidget *print_dialog = NULL; + static GtkWidget *print_cmd_entry = NULL; + +-static GtkWidget *file_sel; ++GtkWidget *file_sel; + gchar *print_cmd; + + /* °õºþ >Release-Note: >Audit-Trail: >Unformatted: