Bug 179209

Summary: net-im/icb: Fix build with Tcl/Tk 8.6
Product: Ports & Packages Reporter: tkato432
Component: Individual Port(s)Assignee: Martin Wilke <miwi>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description tkato432 2013-06-02 19:10:00 UTC
- Fix build with Tcl/Tk 8.6
- Update MASTER_SITES

New file: 
files/patch-icb__c_hush.c
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-02 19:11:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-06-04 09:20:41 UTC
Author: miwi
Date: Tue Jun  4 08:20:26 2013
New Revision: 319829
URL: http://svnweb.freebsd.org/changeset/ports/319829

Log:
  - Unbreak with TCL/TK 8.6
  
  PR:		179209
  Submitted by:	Ports Fury

Added:
  head/net-im/icb/files/patch-icb__c_hush.c   (contents, props changed)
Modified:
  head/net-im/icb/Makefile
  head/net-im/icb/files/patch-icb::c_log.c
  head/net-im/icb/files/patch-icb__oset.c
  head/net-im/icb/files/patch-icb__parse.c
  head/net-im/icb/files/patch-icb__tcl.c

Modified: head/net-im/icb/Makefile
==============================================================================
--- head/net-im/icb/Makefile	Tue Jun  4 08:20:22 2013	(r319828)
+++ head/net-im/icb/Makefile	Tue Jun  4 08:20:26 2013	(r319829)
@@ -5,7 +5,8 @@ PORTNAME=	icb
 PORTVERSION=	5.1.0
 PORTREVISION=	4
 CATEGORIES=	net-im tcl
-MASTER_SITES=	http://www.obfuscation.org/icb/
+#MASTER_SITES=	http://www.obfuscation.org/icb/
+MASTER_SITES=	http://fossies.org/linux/misc/old/
 DISTNAME=	c${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org

Modified: head/net-im/icb/files/patch-icb::c_log.c
==============================================================================
--- head/net-im/icb/files/patch-icb::c_log.c	Tue Jun  4 08:20:22 2013	(r319828)
+++ head/net-im/icb/files/patch-icb::c_log.c	Tue Jun  4 08:20:26 2013	(r319829)
@@ -20,3 +20,46 @@
  
  	/* determine pathname to use */
  	if (path == NULL || *path == '\0') {
+@@ -43,17 +47,17 @@
+ 	/* expand a tilde style path */
+ 	if (*path == '~')
+ 		if ((path = tildexpand(path)) == NULL) {
+-			strcpy(TRET, "c_log: bad login id in path");
++			strcpy(Tcl_GetStringResult(interp), "c_log: bad login id in path");
+ 			return(-1);
+ 		}
+ 	
+ 	/* open the session log */
+ 	if ((logfp = fopen(path, "a")) == NULL) {
+ 		if (errno > sys_nerr)
+-		   sprintf(TRET,
++		   sprintf(Tcl_GetStringResult(interp),
+ 		    "c_log: can't open \"%s\": errno %d", path, errno);
+ 		else
+-		   sprintf(TRET,
++		   sprintf(Tcl_GetStringResult(interp),
+ 		    "c_log: can't open \"%s\": %s", path, strerror(errno));
+ 		return(-1);
+ 	}
+@@ -61,10 +65,10 @@
+ 	/* protect the logfile against others */
+ 	if (fchmod((int)(fileno(logfp)), 0600) != 0) {
+ 		if (errno > sys_nerr)
+-		   sprintf(TRET,
++		   sprintf(Tcl_GetStringResult(interp),
+ 		    "c_log: can't fchmod \"%s\": errno %d", path, errno);
+ 		else
+-		   sprintf(TRET,
++		   sprintf(Tcl_GetStringResult(interp),
+ 		    "c_log: can't fchmod \"%s\": %s", path, strerror(errno));
+ 		fclose(logfp);
+ 		logfp = NULL;
+@@ -146,7 +150,7 @@
+ 				return(TCL_ERROR);
+ 	} else {
+ 		if (logging()) {
+-			sprintf(TRET, "c_log: session logging already on");
++			sprintf(Tcl_GetStringResult(interp), "c_log: session logging already on");
+ 			return(TCL_ERROR);
+ 		} else
+ 			if (startsessionlog(interp, argv[1]) < 0)

Added: head/net-im/icb/files/patch-icb__c_hush.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__c_hush.c	Tue Jun  4 08:20:26 2013	(r319829)
@@ -0,0 +1,29 @@
+--- icb/c_hush.c.orig
++++ icb/c_hush.c
+@@ -23,7 +23,7 @@
+ 	while (*nick == ' ' || *nick == '\t') nick++;
+ 
+ 	if (*nick == '\0') {
+-		strcpy(TRET, "c_hush: can't hush a null nickname");
++		strcpy(Tcl_GetStringResult(interp), "c_hush: can't hush a null nickname");
+ 		return(-1);
+ 	}
+ 
+@@ -31,7 +31,7 @@
+ 		*(nick + MAX_NICKLEN) = '\0';
+ 
+ 	if ((hp = strmakenode(strlen(nick))) == NULL) {
+-		strcpy(TRET, "c_hush: out of memory");
++		strcpy(Tcl_GetStringResult(interp), "c_hush: out of memory");
+ 		return(-1);
+ 	}
+ 	strcpy(hp->str, nick);
+@@ -55,7 +55,7 @@
+ 	STRLIST *s;
+ 
+ 	if ((s = strgetnode(nick, hushhead, 1)) == NULL) {
+-		sprintf(TRET, "c_hush: %s is not being hushed", nick);
++		sprintf(Tcl_GetStringResult(interp), "c_hush: %s is not being hushed", nick);
+ 		return(-1);
+ 	}
+ 	sprintf(mbuf, 

Modified: head/net-im/icb/files/patch-icb__oset.c
==============================================================================
--- head/net-im/icb/files/patch-icb__oset.c	Tue Jun  4 08:20:22 2013	(r319828)
+++ head/net-im/icb/files/patch-icb__oset.c	Tue Jun  4 08:20:26 2013	(r319829)
@@ -18,3 +18,47 @@
  			return(TCL_OK);
  		}
  	}
+@@ -109,7 +109,7 @@
+ 	}
+ 
+ 	if (vars[x].name == NULL) {
+-		sprintf(TRET, "oset: no such variable \"%s\"", argv[1]);
++		sprintf(Tcl_GetStringResult(interp), "oset: no such variable \"%s\"", argv[1]);
+ 		return(TCL_ERROR);
+ 	}
+ 
+@@ -278,7 +278,7 @@
+ 	}
+ 
+ 	if (vars[x].name == NULL) {
+-		sprintf(TRET, "ounset: no such variable \"%s\"", argv[1]);
++		sprintf(Tcl_GetStringResult(interp), "ounset: no such variable \"%s\"", argv[1]);
+ 		return(TCL_ERROR);
+ 	}
+ 
+@@ -310,7 +310,7 @@
+ 	case V_NONNEG:
+ 		tmp = atoi(s);
+ 		if (tmp < 0) {
+-			strcpy(TRET, "oset: only non-negative values allowed");
++			strcpy(Tcl_GetStringResult(interp), "oset: only non-negative values allowed");
+ 			return(-1);
+ 		}
+ 		memcpy (address, &tmp, sizeof(int));
+@@ -331,14 +331,14 @@
+ 			*i_addr = (int)0;
+ 			}
+ 		else {
+-			strcpy(TRET, "oset: only boolean values allowed");
++			strcpy(Tcl_GetStringResult(interp), "oset: only boolean values allowed");
+ 			return(-1);
+ 		}
+ 		break;
+ 	case V_STRING:
+ 		tmp = strlen(s) + 1;
+ 		if ((p = malloc(tmp)) == NULL) {
+-			strcpy(TRET, "oset: not enough memory to set string");
++			strcpy(Tcl_GetStringResult(interp), "oset: not enough memory to set string");
+ 			return(-1);
+ 		}
+ 		memcpy (p, s, tmp);

Modified: head/net-im/icb/files/patch-icb__parse.c
==============================================================================
--- head/net-im/icb/files/patch-icb__parse.c	Tue Jun  4 08:20:22 2013	(r319828)
+++ head/net-im/icb/files/patch-icb__parse.c	Tue Jun  4 08:20:26 2013	(r319829)
@@ -11,3 +11,22 @@
  extern Tcl_Interp *interp;
  char *nextword();
  
+@@ -78,14 +82,14 @@
+ 
+ 	/* Print the tcl result. */
+ 	if (result == TCL_OK) {
+-		if (*interp->result != 0)
+-			putl(interp->result, PL_SL);
++		if (Tcl_GetStringResult(interp) != 0)
++			putl(Tcl_GetStringResult(interp), PL_SL);
+ 	} else {
+-		if (interp->result) {
++		if (Tcl_GetStringResult(interp)) {
+ 			sprintf(mbuf, 
+ 				"%s[=Error=] %s%s",
+ 				printcolor(ColERROR, ColSANE),
+-				interp->result,
++				Tcl_GetStringResult(interp),
+ 				printcolor(ColSANE, ColSANE));
+ 			putl(mbuf, PL_SL);
+ 		} else {

Modified: head/net-im/icb/files/patch-icb__tcl.c
==============================================================================
--- head/net-im/icb/files/patch-icb__tcl.c	Tue Jun  4 08:20:22 2013	(r319828)
+++ head/net-im/icb/files/patch-icb__tcl.c	Tue Jun  4 08:20:26 2013	(r319829)
@@ -10,3 +10,14 @@
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
+@@ -70,8 +73,8 @@
+ 	for (x = 0; defprocs[x] != 0; x++)
+ 		if (Tcl_Eval(interp, defprocs[x]) != TCL_OK) {
+ 			printf("Default binding failed: %s\r\n", defprocs[x]);
+-			if (*interp->result != 0)
+-				puts(interp->result);
++			if (Tcl_GetStringResult(interp) != 0)
++				puts(Tcl_GetStringResult(interp));
+ 		}
+ 
+ }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2013-06-04 09:20:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!