From gahr@gahr.ch  Thu Dec 13 00:13:12 2007
Return-Path: <gahr@gahr.ch>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EF78516A41B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Dec 2007 00:13:12 +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 7E12813C455
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Dec 2007 00:13:12 +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.68)
	(envelope-from <gahr@gahr.ch>)
	id 1J2bhP-0000iQ-0w
	for FreeBSD-gnats-submit@freebsd.org; Thu, 13 Dec 2007 01:13:11 +0100
Received: from gahrtop.localhost (localhost [127.0.0.1])
	by gahrtop.localhost (Postfix) with ESMTP id CC0DA73063
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Dec 2007 01:11:48 +0100 (CET)
Message-Id: <1197504708.64644@gahrtop.localhost>
Date: Thu, 13 Dec 2007 01:11:48 +0100
From: "Pietro Cerutti" <gahr@gahr.ch>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: [patch] irc/trickyirc unbreak fix build with GCC 4.2 + adopt maintainship
X-Send-Pr-Version: gtk-send-pr 0.4.8 
X-GNATS-Notify:

>Number:         118635
>Category:       ports
>Synopsis:       [patch] irc/trickyirc unbreak fix build with GCC 4.2 + adopt maintainship
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 13 00:20:01 UTC 2007
>Closed-Date:    Fri Dec 14 19:08:32 UTC 2007
>Last-Modified:  Fri Dec 14 19:10:04 UTC 2007
>Originator:     Pietro Cerutti
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 8.0-CURRENT #16: Mon Dec 10 15:59:52 CET 2007
    root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034



>Description:


The following patch:

- fixes the build with GCC 4.2
- cleans up all warning messages
- sets maintainship to me

Tested on:

- 8.0-CURRENT i386
- 7.0-BETA3 sparc64


>How-To-Repeat:





>Fix:


--- _trickyirc.diff begins here ---
--- Makefile.orig	2007-12-13 00:31:20.000000000 +0100
+++ Makefile	2007-12-13 00:33:26.000000000 +0100
@@ -12,19 +12,13 @@
 MASTER_SITES=	http://www.leb.net/~troll/
 DISTNAME=	TrickyIRC-${PORTVERSION}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	gahr@gahr.ch
 COMMENT=	Allows client independent detaching and reattaching of IRC sessions
 
 MAKEFILE=	GNUmakefile
 WRKSRC=		${WRKDIR}/trickyirc
 USE_GMAKE=	YES
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN=		Does not compile with GCC 4.2
-.endif
-
 post-install:
 	@ ${MKDIR} ${PREFIX}/share/doc/TrickyIRC
 #	@ ${MKDIR} ${PREFIX}/share/examples/TrickyIRC
@@ -35,4 +29,4 @@
 	@${STRIP_CMD} ${PREFIX}/bin/trickyirc
 	@${CAT} ${PKGMESSAGE} | ${SED} -e s:/usr/local:${PREFIX}:
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- /dev/null	2007-12-13 01:02:43.000000000 +0100
+++ files/patch-core-string_gapsearch.c	2007-12-13 00:35:21.000000000 +0100
@@ -0,0 +1,9 @@
+--- core/string/gapsearch.c.orig	2007-12-13 00:34:15.000000000 +0100
++++ core/string/gapsearch.c	2007-12-13 00:34:31.000000000 +0100
+@@ -1,5 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ 
+ /*
+ 
--- /dev/null	2007-12-13 01:02:43.000000000 +0100
+++ files/patch-core-threading_configload.c	2007-12-13 00:40:45.000000000 +0100
@@ -0,0 +1,80 @@
+--- core/threading/configload.c.orig	2007-12-13 00:35:55.000000000 +0100
++++ core/threading/configload.c	2007-12-13 00:39:37.000000000 +0100
+@@ -55,7 +55,7 @@
+ 	   }
+         if ( c == ']' )
+            {
+-           heading[headingc] = NULL;
++           heading[headingc] = '\0';
+            break;
+            }
+ 	}
+@@ -74,7 +74,7 @@
+ 		  c = fgetc(in);
+ 		  if (( c == 0x0a ) || ( c == EOF ))
+ 		     {
+-		     value[valuec] = NULL;
++		     value[valuec] = '\0';
+ 		     break;
+ 		     }
+ 		  }
+@@ -130,27 +130,27 @@
+ int quote=0;		/* Weather or not we're in the middle of a quoted block */
+ 
+ /* Reset everything */
+-value1[0] = NULL;
+-value2[0] = NULL; 
+-value3[0] = NULL; 
+-value4[0] = NULL; 
+-path[0] = NULL; 
++value1[0] = '\0';
++value2[0] = '\0'; 
++value3[0] = '\0'; 
++value4[0] = '\0'; 
++path[0] = '\0'; 
+ 
+ pos = 0;
+ while ( 1 )
+    {
+-   if ( line[pos] == NULL )
++   if ( line[pos] == '\0')
+       {
+       if ( breaks == 0 )
+-         path[pathc] = NULL;
++         path[pathc] = '\0';
+       if ( breaks == 1 )
+-         value1[valuec] = NULL;
++         value1[valuec] = '\0';
+       if ( breaks == 2 )
+-         value2[valuec] = NULL;
++         value2[valuec] = '\0';
+       if ( breaks == 3 )
+-         value3[valuec] = NULL;
++         value3[valuec] = '\0';
+       if ( breaks == 4 ) 
+-         value4[valuec] = NULL;
++         value4[valuec] = '\0';
+       break;
+       }
+    if (( line[pos] == '#' ) && ( quote == 0 ))
+@@ -184,15 +184,15 @@
+       {
+       /* hit dead space, inc the break count, and zing to the next text */
+       if ( breaks == 0 )
+-         path[pathc] = NULL;
++         path[pathc] = '\0';
+       if ( breaks == 1 )
+-         value1[valuec] = NULL;
++         value1[valuec] = '\0';
+       if ( breaks == 2 )
+-         value2[valuec] = NULL;
++         value2[valuec] = '\0';
+       if ( breaks == 3 )
+-         value3[valuec] = NULL;
++         value3[valuec] = '\0';
+       if ( breaks == 4 )
+-         value4[valuec] = NULL;
++         value4[valuec] = '\0';
+       while ( 1 )
+          {
+          pos++;
--- /dev/null	2007-12-13 01:02:43.000000000 +0100
+++ files/patch-core-threading_core.c	2007-12-13 00:42:02.000000000 +0100
@@ -0,0 +1,11 @@
+--- core/threading/core.c.orig	2007-12-13 00:41:24.000000000 +0100
++++ core/threading/core.c	2007-12-13 00:41:47.000000000 +0100
+@@ -17,7 +17,7 @@
+ while ( buff[i] == head[i] )
+    i++;
+ 
+-while ( buff[i] != NULL )
++while ( buff[i] != '\0' )
+    {
+    SHRet[k] = buff[i];
+    i++;
--- /dev/null	2007-12-13 01:02:43.000000000 +0100
+++ files/patch-tricky_accept.c	2007-12-13 00:47:07.000000000 +0100
@@ -0,0 +1,11 @@
+--- tricky/accept.c.orig	2007-12-13 00:45:25.000000000 +0100
++++ tricky/accept.c	2007-12-13 00:46:50.000000000 +0100
+@@ -22,7 +22,7 @@
+ int	port;
+ struct sockaddr_in myAddr;
+ struct sockaddr_in *remAddr;
+-int     remAddrSize=0;
++socklen_t remAddrSize=0;
+ pthread_attr_t attr, *attrPtr = &attr;
+ 
+ RegisterThread("Arbiter","Manages the client and server communication",TRUE);
--- /dev/null	2007-12-13 01:02:43.000000000 +0100
+++ files/patch-tricky_ircservermanager.c	2007-12-13 01:02:23.000000000 +0100
@@ -0,0 +1,11 @@
+--- tricky/ircservermanager.c.orig	2007-12-13 01:01:29.000000000 +0100
++++ tricky/ircservermanager.c	2007-12-13 01:01:44.000000000 +0100
+@@ -71,7 +71,7 @@
+       Error(1,"Server could not be resolved.");
+       break;
+       }
+-   strcpy(ServerAddress,addr2ascii(PF_INET,hostn->h_addr,sizeof(hostn->h_addr),NULL));
++   strcpy(ServerAddress,inet_ntoa(*(struct in_addr *)hostn->h_addr));
+    memset((char *)&SrvAddr,0,sizeof(SrvAddr)); 
+ 
+    SrvAddr.sin_family = PF_INET;
--- /dev/null	2007-12-13 01:02:43.000000000 +0100
+++ files/patch-tricky_main.c	2007-12-13 00:44:54.000000000 +0100
@@ -0,0 +1,11 @@
+--- tricky/main.c.orig	2007-12-13 00:44:22.000000000 +0100
++++ tricky/main.c	2007-12-13 00:44:01.000000000 +0100
+@@ -59,7 +59,7 @@
+    VerboseOn = 1;
+    }
+ 
+-if ( Startup() != NULL ) /* Startup failed if it returns anything but NULL */
++if ( Startup() ) /* Startup failed if it returns anything but 0 */
+    {
+    printf("\nStartup Failed ... Exiting.\n");
+    exit(1);
--- _trickyirc.diff ends here ---



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Dec 13 00:20:09 UTC 2007 
Responsible-Changed-Why:  
miwi@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118635 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Dec 14 19:08:31 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118635 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/118635: commit references a PR
Date: Fri, 14 Dec 2007 19:08:39 +0000 (UTC)

 miwi        2007-12-14 19:08:30 UTC
 
   FreeBSD ports repository
 
   Modified files:
     irc/trickyirc        Makefile 
   Added files:
     irc/trickyirc/files  patch-core-string_gapsearch.c 
                          patch-core-threading_configload.c 
                          patch-core-threading_core.c 
                          patch-tricky_accept.c 
                          patch-tricky_ircservermanager.c 
                          patch-tricky_main.c 
   Log:
   - Fix build with gcc 4.2
   - Pass maintainership to submitter
   
   PR:             118635
   Submitted by:   Pietro Cerutti <gahr@gahr.ch>
   
   Revision  Changes    Path
   1.13      +2 -8      ports/irc/trickyirc/Makefile
   1.1       +9 -0      ports/irc/trickyirc/files/patch-core-string_gapsearch.c (new)
   1.1       +80 -0     ports/irc/trickyirc/files/patch-core-threading_configload.c (new)
   1.1       +11 -0     ports/irc/trickyirc/files/patch-core-threading_core.c (new)
   1.1       +11 -0     ports/irc/trickyirc/files/patch-tricky_accept.c (new)
   1.1       +11 -0     ports/irc/trickyirc/files/patch-tricky_ircservermanager.c (new)
   1.1       +11 -0     ports/irc/trickyirc/files/patch-tricky_main.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
