ports/118635: [patch] irc/trickyirc unbreak fix build with GCC 4.2 + adopt maintainship

Pietro Cerutti gahr at gahr.ch
Thu Dec 13 00:20:02 UTC 2007


>Number:         118635
>Category:       ports
>Synopsis:       [patch] irc/trickyirc unbreak fix build with GCC 4.2 + adopt maintainship
>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:   Thu Dec 13 00:20:01 UTC 2007
>Closed-Date:
>Last-Modified:
>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 at 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 at FreeBSD.org
+MAINTAINER=	gahr at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list