Bug 175036 - net-im/icb: Fix build with clang
Summary: net-im/icb: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 18:10 UTC by tkato432
Modified: 2013-02-07 14:40 UTC (History)
0 users

See Also:


Attachments
file.diff (8.97 KB, patch)
2013-01-05 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-01-05 18:10:09 UTC
- Fix build with clang
- Support USE_READLINE

New file:
files/patch-icb__c_time.c
files/patch-icb__c_usage.c
files/patch-icb__main.c
files/patch-icb__oset.c
files/patch-icb__parse.c
files/patch-icb__protos.h
files/patch-icb__s_admin.c
files/patch-icb__s_group.c
files/patch-icb__s_user.c
files/patch-icb__s_who.c
files/patch-icb__serverlist.c
files/patch-icb__tcl.c
files/patch-murgil__getrname.c
Comment 1 Marcelo Araujo freebsd_committer freebsd_triage 2013-01-18 06:15:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->araujo

I'll take it.
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2013-02-07 14:34:30 UTC
State Changed
From-To: open->closed
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2013-02-07 14:34:30 UTC
Responsible Changed
From-To: araujo->miwi

Committed
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-02-07 14:34:45 UTC
Author: miwi
Date: Thu Feb  7 14:34:29 2013
New Revision: 311849
URL: http://svnweb.freebsd.org/changeset/ports/311849

Log:
  - Fix build with clang
  - Trim header
  
  PR:		175036
  Submitted by:	Ports Fury

Added:
  head/net-im/icb/files/patch-icb__c_time.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__c_usage.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__main.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__oset.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__parse.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__protos.h   (contents, props changed)
  head/net-im/icb/files/patch-icb__s_admin.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__s_group.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__s_user.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__s_who.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__serverlist.c   (contents, props changed)
  head/net-im/icb/files/patch-icb__tcl.c   (contents, props changed)
  head/net-im/icb/files/patch-murgil__getrname.c   (contents, props changed)
Modified:
  head/net-im/icb/Makefile   (contents, props changed)
  head/net-im/icb/files/patch-icb::c_log.c   (contents, props changed)

Modified: head/net-im/icb/Makefile
==============================================================================
--- head/net-im/icb/Makefile	Thu Feb  7 14:32:42 2013	(r311848)
+++ head/net-im/icb/Makefile	Thu Feb  7 14:34:29 2013	(r311849)
@@ -1,10 +1,5 @@
-# ex:ts=8
-# Ports collection makefile for:  icb
-# Date created:			  Tue Feb 03, 1998
-# Whom:				  David O'Brien (obrien@NUXI.ucdavis.edu)
-#
+# Created by: David O'Brien (obrien@NUXI.ucdavis.edu)
 # $FreeBSD$
-#
 
 PORTNAME=	icb
 PORTVERSION=	5.1.0
@@ -18,6 +13,7 @@ COMMENT=	Internet CB - a mostly-defunct 
 
 USE_TK_BUILD=	yes
 USE_TK=		yes
+USE_READLINE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-tclinclude=${TCL_INCLUDEDIR} \
 		--with-tcllib=${LOCALBASE}/lib
@@ -27,11 +23,13 @@ PORTEXAMPLES=	bartender confuse echofunc
 PLIST_FILES=	bin/icb %%DATADIR%%/icbserverdb
 PLIST_DIRS=	%%DATADIR%%
 
+.include <bsd.port.options.mk>
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/icb/icb ${PREFIX}/bin
 	@${MKDIR} ${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/icbserverdb ${DATADIR}
-.if !defined(NOPORTEXAMPLES)
+.if ${PORT_OPTIONS:MEXAMPLES}
 	@${MKDIR} ${EXAMPLESDIR}
 .for f in ${PORTEXAMPLES}
 	${INSTALL_DATA} ${WRKSRC}/contrib/${f} ${EXAMPLESDIR}

Modified: head/net-im/icb/files/patch-icb::c_log.c
==============================================================================
--- head/net-im/icb/files/patch-icb::c_log.c	Thu Feb  7 14:32:42 2013	(r311848)
+++ head/net-im/icb/files/patch-icb::c_log.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -1,6 +1,16 @@
 --- icb/c_log.c.orig	Sat May 11 23:59:42 2002
 +++ icb/c_log.c	Sun May 12 00:00:20 2002
-@@ -30,7 +30,8 @@
+@@ -7,6 +7,9 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
+ #ifdef HAVE_TIME_H
+ #include <time.h>
+ #endif
+@@ -30,7 +33,8 @@
  	time_t time();
  	struct tm *t, *localtime();
  	time_t clock;

Added: head/net-im/icb/files/patch-icb__c_time.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__c_time.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,11 @@
+--- icb/c_time.c.orig	2000-12-15 12:21:02.000000000 +0900
++++ icb/c_time.c	2012-10-25 18:28:19.000000000 +0900
+@@ -4,7 +4,7 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+-#ifdef STRING_H
++#ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+ #ifdef HAVE_TIME_H

Added: head/net-im/icb/files/patch-icb__c_usage.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__c_usage.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,13 @@
+--- icb/c_usage.c.orig	2000-10-02 20:25:42.000000000 +0900
++++ icb/c_usage.c	2012-10-25 18:29:43.000000000 +0900
+@@ -6,6 +6,10 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
++
+ int
+ c_usage (ARGV_TCL)
+ {

Added: head/net-im/icb/files/patch-icb__main.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__main.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,11 @@
+--- icb/main.c.orig	2000-12-12 16:02:07.000000000 +0900
++++ icb/main.c	2012-10-25 18:18:39.000000000 +0900
+@@ -279,7 +279,7 @@
+ #endif
+ 		readlineinit();
+ 		if (restrictflg && !gv.restricted)
+-			restrict(); 
++			icb_restrict(); 
+ 	}
+ 
+ 	/* try to connect to port - if it fails, start server if we are on */

Added: head/net-im/icb/files/patch-icb__oset.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__oset.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,20 @@
+--- icb/oset.c.orig	2000-12-15 12:21:03.000000000 +0900
++++ icb/oset.c	2012-10-25 18:15:16.000000000 +0900
+@@ -61,7 +61,7 @@
+ 
+ 
+ void
+-restrict(void)
++icb_restrict(void)
+ {
+ 	gv.restricted = 1;
+ 	tclrestrict();
+@@ -91,7 +91,7 @@
+ 		if (gv.restricted)
+ 			TRETURNERR("oset: restricted mode can't be reset")
+ 		else {
+-			restrict();
++			icb_restrict();
+ 			return(TCL_OK);
+ 		}
+ 	}

Added: head/net-im/icb/files/patch-icb__parse.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__parse.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,13 @@
+--- icb/parse.c.orig	2000-12-15 13:29:18.000000000 +0900
++++ icb/parse.c	2012-10-25 18:30:39.000000000 +0900
+@@ -6,6 +6,10 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
++
+ extern Tcl_Interp *interp;
+ char *nextword();
+ 

Added: head/net-im/icb/files/patch-icb__protos.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__protos.h	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,11 @@
+--- icb/protos.h.orig	2000-12-15 12:21:04.000000000 +0900
++++ icb/protos.h	2012-10-25 18:14:24.000000000 +0900
+@@ -171,7 +171,7 @@
+ void readlineinit (void);
+ 
+ /* oset.c */
+-void restrict (void);
++void icb_restrict (void);
+ 
+ /* send.c */
+ void send_command (char* cmd, char* arg);

Added: head/net-im/icb/files/patch-icb__s_admin.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__s_admin.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,13 @@
+--- icb/s_admin.c.orig	2000-10-02 20:25:49.000000000 +0900
++++ icb/s_admin.c	2012-10-25 18:31:57.000000000 +0900
+@@ -6,6 +6,10 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
++
+ int
+ s_admin (ARGV_TCL)
+ {

Added: head/net-im/icb/files/patch-icb__s_group.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__s_group.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,13 @@
+--- icb/s_group.c.orig	2000-10-02 20:25:51.000000000 +0900
++++ icb/s_group.c	2012-10-25 18:32:57.000000000 +0900
+@@ -6,6 +6,10 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
++
+ int
+ s_group (ARGV_TCL)
+ {

Added: head/net-im/icb/files/patch-icb__s_user.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__s_user.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,13 @@
+--- icb/s_user.c.orig	2000-10-02 20:25:52.000000000 +0900
++++ icb/s_user.c	2012-10-25 18:33:46.000000000 +0900
+@@ -6,6 +6,10 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
++
+ int
+ s_user (ARGV_TCL)
+ {

Added: head/net-im/icb/files/patch-icb__s_who.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__s_who.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,13 @@
+--- icb/s_who.c.orig	2000-10-02 20:25:53.000000000 +0900
++++ icb/s_who.c	2012-10-25 18:34:37.000000000 +0900
+@@ -6,6 +6,10 @@
+ #include "icb.h"
+ #include "externs.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
++
+ int
+ s_who (ARGV_TCL)
+ {

Added: head/net-im/icb/files/patch-icb__serverlist.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__serverlist.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,12 @@
+--- icb/serverlist.c.orig	2000-10-03 03:38:45.000000000 +0900
++++ icb/serverlist.c	2012-10-25 18:39:06.000000000 +0900
+@@ -6,6 +6,9 @@
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
+ #ifdef HAVE_CTYPE_H
+ #include <ctype.h>
+ #endif

Added: head/net-im/icb/files/patch-icb__tcl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-icb__tcl.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,12 @@
+--- icb/tcl.c.orig	2000-10-02 20:25:55.000000000 +0900
++++ icb/tcl.c	2012-10-25 18:22:17.000000000 +0900
+@@ -3,6 +3,9 @@
+ /* TCL interface */
+ #include "config.h"
+ 
++#ifdef HAVE_STRING_H
++#include <string.h>
++#endif
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif

Added: head/net-im/icb/files/patch-murgil__getrname.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-im/icb/files/patch-murgil__getrname.c	Thu Feb  7 14:34:29 2013	(r311849)
@@ -0,0 +1,11 @@
+--- murgil/getrname.c.orig	2000-10-02 20:25:59.000000000 +0900
++++ murgil/getrname.c	2012-10-25 18:25:58.000000000 +0900
+@@ -27,7 +27,7 @@
+ {
+ 	struct hostent *host;
+ 	struct sockaddr_in rs;
+-	int rs_size = sizeof(rs);
++	socklen_t rs_size = sizeof(rs);
+ /* temporary hack */
+ char *debug_c;
+ long debug_l, inet_addr();
_______________________________________________
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"