summaryrefslogtreecommitdiff
path: root/chat/icb
diff options
context:
space:
mode:
authorhans <hans>2012-02-16 13:50:52 +0000
committerhans <hans>2012-02-16 13:50:52 +0000
commitc5c7f17d3458c2e664c4e0be26e8fdb5204be3e5 (patch)
tree17c5dd1fe608ad44990390a65a4cbeb07968069a /chat/icb
parente10f78ffcb7549e6267a99653ea5b0cd3cd31758 (diff)
downloadpkgsrc-c5c7f17d3458c2e664c4e0be26e8fdb5204be3e5.tar.gz
Fix build on SunOS.
Diffstat (limited to 'chat/icb')
-rw-r--r--chat/icb/Makefile6
-rw-r--r--chat/icb/distinfo25
-rw-r--r--chat/icb/files/config4
-rw-r--r--chat/icb/patches/patch-ab39
-rw-r--r--chat/icb/patches/patch-ac36
-rw-r--r--chat/icb/patches/patch-al4
-rw-r--r--chat/icb/patches/patch-au19
-rw-r--r--chat/icb/patches/patch-av23
-rw-r--r--chat/icb/patches/patch-ax7
-rw-r--r--chat/icb/patches/patch-bc10
-rw-r--r--chat/icb/patches/patch-bg11
-rw-r--r--chat/icb/patches/patch-bo4
-rw-r--r--chat/icb/patches/patch-bq8
-rw-r--r--chat/icb/patches/patch-icb_signals.c21
-rw-r--r--chat/icb/patches/patch-murgil_contoport.c12
-rw-r--r--chat/icb/patches/patch-murgil_makeport.c12
16 files changed, 189 insertions, 52 deletions
diff --git a/chat/icb/Makefile b/chat/icb/Makefile
index 5314131ebb9..d3d57a51cff 100644
--- a/chat/icb/Makefile
+++ b/chat/icb/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2011/02/28 14:52:41 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2012/02/16 14:13:15 hans Exp $
#
# Note: The file ftp://ftp.icb.net/pub/icb/icb-0.9grok2.tar.gz is way
@@ -23,6 +23,10 @@ EGDIR= ${PREFIX}/share/examples/icb
ICBLIBDIR= ${PREFIX}/libdata/icb
CONF_FILES+= ${EGDIR}/icbserverdb ${PREFIX}/libdata/icbserverdb
+CPPFLAGS.SunOS+= -DBSD_COMP
+LIBS.SunOS+= -lsocket -lnsl
+MAKE_ENV+= OTHERLIBS=${LIBS:Q}
+
post-extract:
${RM} -f ${WRKSRC}/tcl/string.h
diff --git a/chat/icb/distinfo b/chat/icb/distinfo
index b289775439a..0fce407bf16 100644
--- a/chat/icb/distinfo
+++ b/chat/icb/distinfo
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.13 2009/08/06 08:24:29 plunky Exp $
+$NetBSD: distinfo,v 1.14 2012/02/16 14:13:15 hans Exp $
SHA1 (icb-5.0.9.tar.gz) = 151430ad7fe3e9787627b31f6551bf1f398b1bd8
RMD160 (icb-5.0.9.tar.gz) = 8184620d7abf71fa38315fa14aa5345b6981c9bf
Size (icb-5.0.9.tar.gz) = 357565 bytes
SHA1 (patch-aa) = b82fb642c79a200aaa47b0db397c82f19fb7f9ff
-SHA1 (patch-ab) = a68cfdec69b17ca8200b8ab7245acb693265dc2b
-SHA1 (patch-ac) = f090233dccd3f42f9176a6c0d21469bea03bfcc9
+SHA1 (patch-ab) = 636e02532dc3f3f5049e9806e102de580d136177
+SHA1 (patch-ac) = 9748f2edb74e208034873eff117bdff8b30a06ca
SHA1 (patch-ad) = b64e9ca73b5e56122cb82363ee9c765457bde5ca
SHA1 (patch-ae) = c98d058cfe6177fb4807104695f96c774b11d177
SHA1 (patch-af) = b16cdbbd6d4a5489b19bb3339b6cd8d95b5395d9
@@ -14,7 +14,7 @@ SHA1 (patch-ah) = 464f3a3de74f049187d8e6702c6e060b4fe03146
SHA1 (patch-ai) = 11322bc2753dd6921272b2e64554349bb7aa6c5c
SHA1 (patch-aj) = 1ba8c916513b449bede0330026b9f844d03d9a2f
SHA1 (patch-ak) = 8e363cc6c5647c064d56ec75b8b627d7d9a07a72
-SHA1 (patch-al) = e97d0ed0ebe4b3b514455ab0dc348792070efc74
+SHA1 (patch-al) = 2133e12939f26a875b6f3e74221767adf6451c58
SHA1 (patch-am) = 58ce219463d2cdb0306a664b383015096938e6d6
SHA1 (patch-an) = d66e16511fbfe4f51ba2f7f77a4a67087470342a
SHA1 (patch-ao) = a798b898e3527f7a4458c6e278e86ef69bb38a53
@@ -23,19 +23,19 @@ SHA1 (patch-aq) = 78b772a2f6ec27a782b1681a61a2329992dcc741
SHA1 (patch-ar) = 7fa954914f8c0fdad4f610f37dd81129ec57bc14
SHA1 (patch-as) = 5c42bfdc2e836fb86e814c396760040560864256
SHA1 (patch-at) = 703abcc2415b92776241011fe893286de06da034
-SHA1 (patch-au) = 35db5c53aed27f3a73977098b89cf4273e801a22
-SHA1 (patch-av) = 7c18f6e81ac82466fd5fc8b30e12264933eab5d6
+SHA1 (patch-au) = 2052ef3b8c28150700e0ba287162b0c62d53a90f
+SHA1 (patch-av) = 2bef35b6868697c8b95a923e5ccf8ff900175b25
SHA1 (patch-aw) = 6dbc66a63f52244ac9b8b29346cb376b98442695
-SHA1 (patch-ax) = 9dbc788c08357e2207f08290a014267f306ead76
+SHA1 (patch-ax) = 6dc671de0abe01139fdaa193bd1c627b2d74cfb9
SHA1 (patch-ay) = f8a787d5a6611890d65fa8b0411977fd5c0bc7e9
SHA1 (patch-az) = 6d8a12c0309678e854253d1256b86851f9ed2b4e
SHA1 (patch-ba) = b85f00aea832da4d9f730b5295f943264550a7ab
SHA1 (patch-bb) = 64cebf4a262c31850bc1658e3a3c8841baadc37c
-SHA1 (patch-bc) = 88dd502d44f708c81a2f54953c17b5cca18d59c7
+SHA1 (patch-bc) = 4a8273e45463a1b0f3373c26710ea47f76d96eab
SHA1 (patch-bd) = f4ed0e007c5971d8c01e1c1cfebfd32adb24a746
SHA1 (patch-be) = 862df6c2de3a26c8a8b761b122ddea73fdf8d910
SHA1 (patch-bf) = 4e65811b06f100659c83a3c6a95fa0ba5732f991
-SHA1 (patch-bg) = 51cc10151b658ec094e4cceb67e11993533cb7ca
+SHA1 (patch-bg) = 30c13a23de9e1e232e69011755e788d9a1df1f20
SHA1 (patch-bh) = 5e24c606b9ee9656b15d66a4611d732b563cc831
SHA1 (patch-bi) = cc92516799335123f6ac0d37380a428e9a88063d
SHA1 (patch-bj) = 082e74059e3c2f91f5a56b5d100e4cdedd00340f
@@ -43,9 +43,12 @@ SHA1 (patch-bk) = caab3a28f9e05f7e3321d5b56ad3dd47ee3e3b40
SHA1 (patch-bl) = cef6d92a02bb6080a9121f2ecbd36c4b15777a68
SHA1 (patch-bm) = 1171ce0885693b198d8d7ad8960c55dec4604aa0
SHA1 (patch-bn) = 57972d7c9712755833dc97559edded528e38aa97
-SHA1 (patch-bo) = c04e9b0103b03559896de098a4beea7c3f5c311d
+SHA1 (patch-bo) = 03f940e1ebfcfa4c33e84852d9d4852f8c9da92a
SHA1 (patch-bp) = f79cfc4a9bd18397611e3dd46b4b85675054da6c
-SHA1 (patch-bq) = dba28647f096cde0ff682ed60f7fea473f74c008
+SHA1 (patch-bq) = bdb076f4aaed118baa893297aa98f10e9aa6cb28
SHA1 (patch-br) = f0cc8e6fb3e83076a0160b455e64cfe82f297f44
SHA1 (patch-bs) = c0b5a045b02e9630d2dda713b5d54b780ed2d5de
SHA1 (patch-bt) = a5eb739d19170e2af57cafc81e8adaf5e27b85a8
+SHA1 (patch-icb_signals.c) = 1b648d7137ad361e43d4cd472fe811d16ec5cac7
+SHA1 (patch-murgil_contoport.c) = 2ee05addd21be0d906b5147efac1f48841d72298
+SHA1 (patch-murgil_makeport.c) = cacfa30605bcc688a8a48f6152527de82d04a9c8
diff --git a/chat/icb/files/config b/chat/icb/files/config
index e159164cdc9..c541a5e0ea3 100644
--- a/chat/icb/files/config
+++ b/chat/icb/files/config
@@ -1,4 +1,4 @@
-# $NetBSD: config,v 1.2 2008/03/02 07:06:20 jlam Exp $
+# $NetBSD: config,v 1.3 2012/02/16 14:13:15 hans Exp $
#
# THIS IS AN AUTOMATICALLY GENERATED FILE
#
@@ -30,7 +30,7 @@ LFLAGS = -u -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
SYSDEP =sysdep.bsd
# Other libraries to include.
-OTHERLIBS =-ltermcap
+OTHERLIBS +=-ltermcap
# Resolver library
RESOLVLIB =
diff --git a/chat/icb/patches/patch-ab b/chat/icb/patches/patch-ab
index c6aa6086c54..da77ce6b9d0 100644
--- a/chat/icb/patches/patch-ab
+++ b/chat/icb/patches/patch-ab
@@ -1,8 +1,27 @@
-$NetBSD: patch-ab,v 1.2 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-ab,v 1.3 2012/02/16 14:13:15 hans Exp $
--- tcl/tclGlob.c.orig 2008-12-16 20:18:00.000000000 -0500
+++ tcl/tclGlob.c 2008-12-16 20:18:01.000000000 -0500
-@@ -40,8 +40,6 @@
+@@ -24,18 +24,24 @@ static char rcsid[] = "$Header: /home/ag
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+-#include <sys/dir.h>
++#include <dirent.h>
+ #include <sys/stat.h>
+ #include <tcl.h>
+
++#define direct dirent
++
++#ifdef __sun
++#define D_NAMLEN(d) (strlen((d)->d_name))
++#else
++#define D_NAMLEN(d) ((d)->d_namlen)
++#endif
++
+ /*
+ * The structure below is used to keep track of a globbing result
+ * being built up (i.e. a partial list of file names). The list
* grows dynamically to be as big as needed.
*/
@@ -11,3 +30,19 @@ $NetBSD: patch-ab,v 1.2 2008/12/17 02:19:59 christos Exp $
typedef struct {
char *result; /* Pointer to result area. */
int totalSpace; /* Total number of characters allocated
+@@ -298,12 +304,12 @@ DoGlob(interp, dir, rem, resPtr)
+ if (Tcl_StringMatch(entryPtr->d_name, pattern)) {
+ if (*p == 0) {
+ AppendResult(dir, entryPtr->d_name,
+- (int) entryPtr->d_namlen, resPtr);
++ (int) D_NAMLEN(entryPtr), resPtr);
+ } else {
+- if ((l1+entryPtr->d_namlen+2) <= STATIC_SIZE) {
++ if ((l1+D_NAMLEN(entryPtr)+2) <= STATIC_SIZE) {
+ newDir = static1;
+ } else {
+- newDir = malloc((unsigned) (l1+entryPtr->d_namlen+2));
++ newDir = malloc((unsigned) (l1+D_NAMLEN(entryPtr)+2));
+ }
+ sprintf(newDir, "%s%s/", dir, entryPtr->d_name);
+ result = DoGlob(interp, newDir, p+1, resPtr);
diff --git a/chat/icb/patches/patch-ac b/chat/icb/patches/patch-ac
index a7e9b370664..b74e9d1a9bc 100644
--- a/chat/icb/patches/patch-ac
+++ b/chat/icb/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.2 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-ac,v 1.3 2012/02/16 14:13:15 hans Exp $
--- icb/c_log.c.orig 1995-02-24 16:20:18.000000000 -0500
+++ icb/c_log.c 2008-12-16 20:17:59.000000000 -0500
@@ -10,7 +10,7 @@ $NetBSD: patch-ac,v 1.2 2008/12/17 02:19:59 christos Exp $
FILE *logfp = NULL;
-@@ -45,8 +46,6 @@
+@@ -45,8 +46,6 @@ char *path;
time_t time();
struct tm *t, *localtime();
time_t clock;
@@ -19,7 +19,35 @@ $NetBSD: patch-ac,v 1.2 2008/12/17 02:19:59 christos Exp $
/* determine pathname to use */
if (path == NULL || *path == '\0')
-@@ -97,8 +96,8 @@
+@@ -64,23 +63,15 @@ char *path;
+
+ /* open the session log */
+ if ((logfp = fopen(path, "a")) == NULL) {
+- if (errno > sys_nerr)
+- sprintf(TRET,
+- "c_log: can't open \"%s\": errno %d", path, errno);
+- else
+- sprintf(TRET,
+- "c_log: can't open \"%s\": %s", path, sys_errlist[errno]);
++ sprintf(TRET,
++ "c_log: can't open \"%s\": %s", path, strerror(errno));
+ return(-1);
+ }
+
+ /* protect the logfile against others */
+ if (fchmod((int)(fileno(logfp)), 0600) != 0) {
+- if (errno > sys_nerr)
+- sprintf(TRET,
+- "c_log: can't fchmod \"%s\": errno %d", path, errno);
+- else
+- sprintf(TRET,
+- "c_log: can't fchmod \"%s\": %s", path, sys_errlist[errno]);
++ sprintf(TRET,
++ "c_log: can't fchmod \"%s\": %s", path, strerror(errno));
+ fclose(logfp);
+ logfp = NULL;
+ return(-1);
+@@ -97,8 +88,8 @@ char *path;
aptr++;
/* timestamp it */
@@ -30,7 +58,7 @@ $NetBSD: patch-ac,v 1.2 2008/12/17 02:19:59 christos Exp $
putl(mbuf, PL_SCR | PL_LOG);
return(0);
-@@ -126,8 +125,8 @@
+@@ -126,8 +117,8 @@ closesessionlog()
aptr++;
/* timestamp it */
diff --git a/chat/icb/patches/patch-al b/chat/icb/patches/patch-al
index d081aa8b29b..ff542bc0078 100644
--- a/chat/icb/patches/patch-al
+++ b/chat/icb/patches/patch-al
@@ -1,4 +1,4 @@
-$NetBSD: patch-al,v 1.3 2009/08/06 08:24:29 plunky Exp $
+$NetBSD: patch-al,v 1.4 2012/02/16 14:13:15 hans Exp $
--- icb/protos.h.orig 1995-02-24 21:20:25.000000000 +0000
+++ icb/protos.h
@@ -16,7 +16,7 @@ $NetBSD: patch-al,v 1.3 2009/08/06 08:24:29 plunky Exp $
int ishushed(char *nick);
int lcaseit(char *s);
-#ifdef linux
-+#if defined(linux) || (defined(BSD) && BSD >= 199306)
++#if defined(linux) || (defined(BSD) && BSD >= 199306) || defined(__sun)
int linebuffer(FILE *fp);
#else
int linebuffer(struct _iobuf *fp);
diff --git a/chat/icb/patches/patch-au b/chat/icb/patches/patch-au
index ff2d17318b9..af12da37cc2 100644
--- a/chat/icb/patches/patch-au
+++ b/chat/icb/patches/patch-au
@@ -1,16 +1,25 @@
-$NetBSD: patch-au,v 1.4 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-au,v 1.5 2012/02/16 14:13:15 hans Exp $
--- icb/tcl.c.orig 1995-02-24 16:20:30.000000000 -0500
+++ icb/tcl.c 2008-12-16 20:18:01.000000000 -0500
-@@ -3,6 +3,7 @@
+@@ -3,13 +3,14 @@
/* TCL interface */
+-#ifdef linux
+#include <limits.h>
- #ifdef linux
++#if defined(linux) || defined(__sun)
#include <unistd.h>
#endif
-@@ -95,7 +96,11 @@
+
+ #include "icb.h"
+ #include "externs.h"
+-#include <sys/dir.h>
++#include <dirent.h>
+ #include <sys/file.h>
+
+ Tcl_Interp *interp;
+@@ -95,7 +96,11 @@ tclinit()
tclreadicbrc()
{
char *p, *path;
@@ -22,7 +31,7 @@ $NetBSD: patch-au,v 1.4 2008/12/17 02:19:59 christos Exp $
if (!(path = getrcname())) return;
-@@ -117,7 +122,11 @@
+@@ -117,7 +122,11 @@ getrcname()
{
static char *names[] = { ".icbrc", ".fnrc", ".tclrc" , (char *)NULL };
char *rcfile, *homedir, *getenv(), **p;
diff --git a/chat/icb/patches/patch-av b/chat/icb/patches/patch-av
index 639a89d9820..b976c6aa420 100644
--- a/chat/icb/patches/patch-av
+++ b/chat/icb/patches/patch-av
@@ -1,4 +1,4 @@
-$NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
+$NetBSD: patch-av,v 1.4 2012/02/16 14:13:15 hans Exp $
--- icb/unix.c.orig 1995-02-24 16:20:31.000000000 -0500
+++ icb/unix.c 2009-07-23 21:22:34.000000000 -0400
@@ -8,8 +8,9 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
#include "externs.h"
+#include <limits.h>
#include <pwd.h>
+-#include <sys/dir.h>
+#include <time.h>
- #include <sys/dir.h>
++#include <dirent.h>
#undef stty
#undef gtty
@@ -22,7 +23,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
#include <sgtty.h>
#endif
-+#if defined(__linux__) || defined(__NetBSD__)
++#if defined(__linux__) || defined(__NetBSD__) || defined(__sun)
+#include <termios.h>
+#define TTYSTRUCT termios
+#define stty(fd,buf) tcsetattr((fd),TCSANOW,(buf))
@@ -40,7 +41,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
char *getlogin();
-@@ -65,13 +73,16 @@
+@@ -65,13 +73,16 @@ gettime()
/* set line buffering for an open file pointer */
/* output will be flushed every newline */
@@ -59,7 +60,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
}
-@@ -79,13 +90,13 @@
+@@ -79,13 +90,13 @@ FILE *fp;
pushback(c)
char c;
{
@@ -76,7 +77,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
}
-@@ -94,25 +105,25 @@
+@@ -94,25 +105,25 @@ char c;
getterm()
{
@@ -110,7 +111,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
/* get local special chars */
if (ioctl(0, TIOCGLTC, &lt) < 0) {
ttyinfo.redraw = '\022'; /* ^R */
-@@ -121,10 +132,10 @@
+@@ -121,10 +132,10 @@ getterm()
ttyinfo.redraw = lt.t_rprntc;
ttyinfo.werase = lt.t_werasc;
}
@@ -123,7 +124,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
/* get the current window size */
getwinsize();
-@@ -145,14 +156,14 @@
+@@ -145,14 +156,14 @@ icbterm()
bcopy((char *)&origtty, (char *)&tty, (unsigned)sizeof(struct TTYSTRUCT));
/* turn on cbreak - turn off echo */
@@ -143,7 +144,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
echomode = 0;
/* set the new flags */
-@@ -206,7 +217,11 @@
+@@ -206,7 +217,11 @@ char *s;
struct passwd *pw;
char login[17];
char *p = login;
@@ -155,7 +156,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
/* has to start with a tilde */
if (*s++ != '~')
-@@ -258,11 +273,11 @@
+@@ -258,11 +273,11 @@ echo()
}
/* turn on echo */
@@ -171,7 +172,7 @@ $NetBSD: patch-av,v 1.3 2009/07/24 01:24:39 christos Exp $
echomode = 1;
-@@ -287,11 +302,11 @@
+@@ -287,11 +302,11 @@ noecho()
}
/* turn off echo */
diff --git a/chat/icb/patches/patch-ax b/chat/icb/patches/patch-ax
index fdf69347609..32c238ac6ef 100644
--- a/chat/icb/patches/patch-ax
+++ b/chat/icb/patches/patch-ax
@@ -1,9 +1,12 @@
-$NetBSD: patch-ax,v 1.2 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-ax,v 1.3 2012/02/16 14:13:15 hans Exp $
--- tcl/tclCmdIZ.c.orig 1995-02-24 16:19:54.000000000 -0500
+++ tcl/tclCmdIZ.c 2008-12-16 20:18:01.000000000 -0500
-@@ -30,8 +30,6 @@
+@@ -28,10 +28,9 @@ static char rcsid[] = "$Header: /home/ag
+ #include <sys/file.h>
+ #include <sys/stat.h>
#include <sys/time.h>
++#include <fcntl.h>
#include "tclInt.h"
-extern int errno;
diff --git a/chat/icb/patches/patch-bc b/chat/icb/patches/patch-bc
index ed5cbc801a7..6fd5ed4ffd2 100644
--- a/chat/icb/patches/patch-bc
+++ b/chat/icb/patches/patch-bc
@@ -1,8 +1,14 @@
-$NetBSD: patch-bc,v 1.2 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-bc,v 1.3 2012/02/16 14:13:15 hans Exp $
--- murgil/newconnect.c.orig 1995-02-24 16:19:42.000000000 -0500
+++ murgil/newconnect.c 2008-12-16 20:18:01.000000000 -0500
-@@ -20,8 +20,6 @@
+@@ -15,13 +15,12 @@
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <sys/file.h>
+ #include <errno.h>
+ #include "select.h"
#include "ipcf.h"
#include "externs.h"
diff --git a/chat/icb/patches/patch-bg b/chat/icb/patches/patch-bg
index ed6035fec96..35982169189 100644
--- a/chat/icb/patches/patch-bg
+++ b/chat/icb/patches/patch-bg
@@ -1,8 +1,8 @@
-$NetBSD: patch-bg,v 1.2 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-bg,v 1.3 2012/02/16 14:13:15 hans Exp $
--- tcl/tclCmdAH.c.orig 1995-02-24 16:19:53.000000000 -0500
+++ tcl/tclCmdAH.c 2008-12-16 20:18:00.000000000 -0500
-@@ -38,9 +38,21 @@
+@@ -38,9 +38,22 @@ static char rcsid[] = "$Header: /home/ag
#include <sys/wait.h>
#include "tclInt.h"
@@ -14,6 +14,7 @@ $NetBSD: patch-bg,v 1.2 2008/12/17 02:19:59 christos Exp $
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#include <unistd.h>
++#include <fcntl.h>
+#endif
+
+#if !(defined(BSD) && BSD >= 199306)
@@ -25,7 +26,7 @@ $NetBSD: patch-bg,v 1.2 2008/12/17 02:19:59 christos Exp $
/*
*----------------------------------------------------------------------
-@@ -430,7 +442,7 @@
+@@ -430,7 +443,7 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
int pid = -1; /* -1 means child process doesn't
* exist (yet). Non-zero gives its
* id (0 only in child). */
@@ -34,7 +35,7 @@ $NetBSD: patch-bg,v 1.2 2008/12/17 02:19:59 christos Exp $
char *cmdName, *execName;
/*
-@@ -501,8 +513,13 @@
+@@ -501,8 +514,13 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
} else {
char tmp[sizeof(TMP_FILE_NAME) + 1];
strcpy(tmp, TMP_FILE_NAME);
@@ -48,7 +49,7 @@ $NetBSD: patch-bg,v 1.2 2008/12/17 02:19:59 christos Exp $
if (stdIn[0] < 0) {
sprintf(interp->result,
"couldn't create input file for \"%.50s\" command: %.50s",
-@@ -642,7 +659,7 @@
+@@ -642,7 +660,7 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
sprintf(interp->result, "command terminated abnormally");
result = TCL_ERROR;
}
diff --git a/chat/icb/patches/patch-bo b/chat/icb/patches/patch-bo
index dfac19857cc..4cd3b37462b 100644
--- a/chat/icb/patches/patch-bo
+++ b/chat/icb/patches/patch-bo
@@ -1,4 +1,4 @@
-$NetBSD: patch-bo,v 1.2 2008/12/17 02:19:59 christos Exp $
+$NetBSD: patch-bo,v 1.3 2012/02/16 14:13:15 hans Exp $
--- tcl/strerror.c.orig 1995-02-24 16:19:50.000000000 -0500
+++ tcl/strerror.c 2008-12-16 20:18:00.000000000 -0500
@@ -6,7 +6,7 @@ $NetBSD: patch-bo,v 1.2 2008/12/17 02:19:59 christos Exp $
#include <stdio.h>
#include <string.h>
-+#if !defined(BSD4_4) && !defined(__linux__) && !defined(__APPLE__) && !defined(__DragonFly__)
++#if !defined(BSD4_4) && !defined(__linux__) && !defined(__APPLE__) && !defined(__DragonFly__) && !defined(__sun)
/*
* List of known errors:
*/
diff --git a/chat/icb/patches/patch-bq b/chat/icb/patches/patch-bq
index e243d78e7e5..5bbd29b3da0 100644
--- a/chat/icb/patches/patch-bq
+++ b/chat/icb/patches/patch-bq
@@ -1,11 +1,13 @@
-$NetBSD: patch-bq,v 1.3 2009/07/24 01:24:39 christos Exp $
+$NetBSD: patch-bq,v 1.4 2012/02/16 14:13:15 hans Exp $
--- icb/main.c.orig 1995-02-24 16:20:24.000000000 -0500
+++ icb/main.c 2009-07-23 21:19:32.000000000 -0400
-@@ -7,6 +7,7 @@
+@@ -6,7 +6,8 @@
+ #include "icb.h"
#include "externs.h"
#include <sys/wait.h>
- #include <sys/dir.h>
+-#include <sys/dir.h>
++#include <dirent.h>
+#include <time.h>
#include "getswitch.h"
diff --git a/chat/icb/patches/patch-icb_signals.c b/chat/icb/patches/patch-icb_signals.c
new file mode 100644
index 00000000000..37276a51bec
--- /dev/null
+++ b/chat/icb/patches/patch-icb_signals.c
@@ -0,0 +1,21 @@
+$NetBSD: patch-icb_signals.c,v 1.1 2012/02/16 14:13:15 hans Exp $
+
+--- icb/signals.c.orig 1995-02-24 22:20:29.000000000 +0100
++++ icb/signals.c 2012-01-20 15:51:46.655776885 +0100
+@@ -40,11 +40,14 @@ trapsignals()
+ sighandler
+ suspend()
+ {
++ sigset_t set;
++
+ restoreterm();
+ signal(SIGTSTP, SIG_DFL);
+- sigsetmask(sigblock(0) &~ mask(SIGTSTP));
++ sigaddset(&set, SIGTSTP);
++ sigprocmask(SIG_UNBLOCK, &set, NULL);
+ kill(0, SIGTSTP);
+- sigblock(mask(SIGTSTP));
++ sigprocmask(SIG_BLOCK, &set, NULL);
+ signal(SIGTSTP, suspend);
+ icbterm();
+ continued = 1;
diff --git a/chat/icb/patches/patch-murgil_contoport.c b/chat/icb/patches/patch-murgil_contoport.c
new file mode 100644
index 00000000000..b2b74fe6111
--- /dev/null
+++ b/chat/icb/patches/patch-murgil_contoport.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-murgil_contoport.c,v 1.1 2012/02/16 14:13:15 hans Exp $
+
+--- murgil/contoport.c.orig 1995-02-24 22:19:40.000000000 +0100
++++ murgil/contoport.c 2012-01-20 15:01:20.773471557 +0100
+@@ -6,6 +6,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/socket.h>
++#include <sys/file.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include "select.h"
diff --git a/chat/icb/patches/patch-murgil_makeport.c b/chat/icb/patches/patch-murgil_makeport.c
new file mode 100644
index 00000000000..1e46f33fdcb
--- /dev/null
+++ b/chat/icb/patches/patch-murgil_makeport.c
@@ -0,0 +1,12 @@
+$NetBSD: patch-murgil_makeport.c,v 1.1 2012/02/16 14:13:15 hans Exp $
+
+--- murgil/makeport.c.orig 1995-02-24 22:19:42.000000000 +0100
++++ murgil/makeport.c 2012-01-20 14:59:37.892111852 +0100
+@@ -9,6 +9,7 @@
+ #include <signal.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <sys/file.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include "select.h"