summaryrefslogtreecommitdiff
path: root/chat/i2cbd/patches
diff options
context:
space:
mode:
authorjwise <jwise@pkgsrc.org>2006-05-11 02:36:15 +0000
committerjwise <jwise@pkgsrc.org>2006-05-11 02:36:15 +0000
commit9546463d093bd8e63800103e8d84dc92960a872d (patch)
treecab4ecab4a60380ba41e3acae48b6ac0d87041af /chat/i2cbd/patches
parent4a380ba70b3ab018873927a376064ac33d633eb7 (diff)
downloadpkgsrc-9546463d093bd8e63800103e8d84dc92960a872d.tar.gz
Update to i2cbd-2.0_BETA4.
This release folds in pkgsrc patches patch-ad through patch-ai. For the moment, remove patch-aj as well, since it doesn't apply (file paths are wrong). I'll try to fold this into the next beta, however.
Diffstat (limited to 'chat/i2cbd/patches')
-rw-r--r--chat/i2cbd/patches/patch-ad21
-rw-r--r--chat/i2cbd/patches/patch-af12
-rw-r--r--chat/i2cbd/patches/patch-ag28
-rw-r--r--chat/i2cbd/patches/patch-ah24
-rw-r--r--chat/i2cbd/patches/patch-ai51
-rw-r--r--chat/i2cbd/patches/patch-aj154
6 files changed, 0 insertions, 290 deletions
diff --git a/chat/i2cbd/patches/patch-ad b/chat/i2cbd/patches/patch-ad
deleted file mode 100644
index 26b92e9a687..00000000000
--- a/chat/i2cbd/patches/patch-ad
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-ad,v 1.3 2006/05/10 20:16:40 christos Exp $
---- src/access.c.orig 2003-10-24 16:47:49.000000000 -0400
-+++ src/access.c 2006-05-10 16:09:58.000000000 -0400
-@@ -77,7 +77,7 @@
- if (!userdb)
- return -1;
-
-- if (strlen(password) <= 0)
-+ if (strlen(password) == 0)
- return -1;
-
- strlcpy(kbuf, user, KEY_SIZE);
-@@ -86,7 +86,7 @@
- key.data = kbuf;
- key.size = strlen(kbuf);
-
-- if (!userdb->get(userdb, &key, &data, 0))
-+ if (userdb->get(userdb, &key, &data, 0))
- return -1;
-
- strncpy(line, data.data, data.size);
diff --git a/chat/i2cbd/patches/patch-af b/chat/i2cbd/patches/patch-af
deleted file mode 100644
index a86c9b9bbfc..00000000000
--- a/chat/i2cbd/patches/patch-af
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-af,v 1.1 2005/10/31 18:30:49 tv Exp $
-
---- src/externs.h.orig 2001-10-30 14:46:20.000000000 -0500
-+++ src/externs.h
-@@ -3,6 +3,7 @@
- /* For copying and distribution information, see the file COPYING */
-
- #include <sys/types.h>
-+#include <sys/time.h>
- #include "config.h"
- #include "ipcf.h"
- #include "groups.h"
diff --git a/chat/i2cbd/patches/patch-ag b/chat/i2cbd/patches/patch-ag
deleted file mode 100644
index 55088a8c010..00000000000
--- a/chat/i2cbd/patches/patch-ag
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2005/12/13 16:26:39 joerg Exp $
-
---- src/main.c.orig 2005-12-13 16:11:25.000000000 +0000
-+++ src/main.c
-@@ -4,4 +4,5 @@
-
- #include <sys/param.h>
-+#include <sys/time.h>
- #include <sys/resource.h>
- #include <sys/types.h>
-@@ -14,9 +15,17 @@
- #include <string.h>
- #include <unistd.h>
-+#if defined(__DragonFly__)
-+#include <libutil.h>
-+#else
- #include <util.h>
-+#endif
- #include "externs.h"
- #include "userdb.h"
- #include "version.h"
-
-+#if defined(__DragonFly__) && !defined(O_SYNC)
-+#define O_SYNC O_FSYNC
-+#endif
-+
- static void open_logs (void);
- void close_logs (void);
diff --git a/chat/i2cbd/patches/patch-ah b/chat/i2cbd/patches/patch-ah
deleted file mode 100644
index 4c491cbaed0..00000000000
--- a/chat/i2cbd/patches/patch-ah
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2005/12/13 16:26:39 joerg Exp $
-
---- src/signals.c.orig 2005-12-13 16:15:36.000000000 +0000
-+++ src/signals.c
-@@ -40,10 +40,17 @@ icbdump (int sig)
- return /* -1 */;
- }
-
-+#if defined(__DragonFly__)
- for (i = 0; i < 8; i++)
-- fprintf (dump, "%d\n", fdset.fds_bits[i]);
-+ fprintf (dump, "%lu\n", fdset.fds_bits[i]);
- for (i = 0; i < 8; i++)
-- fprintf (dump, "%d\n", serversocks.fds_bits[i]);
-+ fprintf (dump, "%lu\n", serversocks.fds_bits[i]);
-+#else
-+ for (i = 0; i < 8; i++)
-+ fprintf (dump, "%d\n", fdset.fds_bits[i]);
-+ for (i = 0; i < 8; i++)
-+ fprintf (dump, "%d\n", serversocks.fds_bits[i]);
-+#endif
-
- fprintf (dump, "%d\n", highestfd);
-
diff --git a/chat/i2cbd/patches/patch-ai b/chat/i2cbd/patches/patch-ai
deleted file mode 100644
index c45e27da03a..00000000000
--- a/chat/i2cbd/patches/patch-ai
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2006/05/10 20:31:50 christos Exp $
-
---- src/serverserve.c.orig 2001-10-26 19:07:19.000000000 -0400
-+++ src/serverserve.c 2006-05-10 16:28:22.000000000 -0400
-@@ -19,7 +19,9 @@
- fd_set held_fdset;
-
- void serverserve (void);
-+#ifdef USE_ALARM
- static void gotalarm (int);
-+#endif
- static void sdoinput (void);
-
- void
-@@ -35,10 +37,13 @@
- for (i = 0; i < MAX_USERS+1; i++)
- cbufs[i].new = 1;
-
-+#ifdef USE_ALARM
- signal(SIGALRM, gotalarm);
-+#endif
- timeisup = 0;
-
- for (;;) {
-+#ifdef USE_ALARM
- if (polldelay) {
- if (setitimer(ITIMER_REAL, polldelay, 0) < 0) {
- perror("server: setitimer failed");
-@@ -46,6 +51,7 @@
- }
- timeisup = 0;
- }
-+#endif
-
- memmove(&fdr, &fdset, sizeof(fdset));
- memmove(&efdr, &fdset, sizeof(fdset));
-@@ -85,12 +91,14 @@
- }
- }
-
-+#ifdef USE_ALARM
- static void
- gotalarm(int n)
- {
- timeisup++;
- signal(n, gotalarm);
- }
-+#endif
-
- static void
- sdoinput(void)
diff --git a/chat/i2cbd/patches/patch-aj b/chat/i2cbd/patches/patch-aj
deleted file mode 100644
index b8aa9c8c118..00000000000
--- a/chat/i2cbd/patches/patch-aj
+++ /dev/null
@@ -1,154 +0,0 @@
---- i2cbd-2.0_BETA3/src/makeport.c 2001-10-26 20:03:37.000000000 +0000
-+++ i2cbd-2.0_BETA3nb2/src/makeport.c 2006-05-11 01:46:34.000000000 +0000
-@@ -64,12 +64,6 @@
- /* start listening for connections */
- listen(s, 5);
-
-- /* make it non-blocking */
-- if (fcntl(s, F_SETFL, FNDELAY) < 0) {
-- perror("makenewport: fcntl");
-- return(-1);
-- }
--
- /* Don't close on exec */
- flags = fcntl(s, F_GETFD, 0);
- flags = flags & ~ FD_CLOEXEC;
---- i2cbd-2.0_BETA3/src/newconnect.c 2006-04-30 23:28:07.000000000 +0000
-+++ i2cbd-2.0_BETA3nb2/src/newconnect.c 2006-05-11 01:46:56.000000000 +0000
-@@ -65,12 +65,6 @@
- perror("SO_SNDBUF");
- }
-
-- /* make the socket non-blocking */
-- if (fcntl(ns, F_SETFL, FNDELAY) < 0) {
-- perror("new_client:fcntl");
-- return(-1);
-- }
--
- /* Don't close on exec */
- flags = fcntl(ns, F_GETFD, 0);
- flags = flags & ~ FD_CLOEXEC;
---- i2cbd-2.0_BETA3/src/sendpacket.c 2000-03-23 14:41:52.000000000 +0000
-+++ i2cbd-2.0_BETA3nb2/src/sendpacket.c 2006-05-11 01:03:30.000000000 +0000
-@@ -7,6 +7,7 @@
- #include <sys/socket.h>
- #include <stdio.h>
- #include <errno.h>
-+#include <fcntl.h>
- #include "externs.h"
-
- int sendpacket(int, char *);
-@@ -14,23 +15,37 @@
- int
- sendpacket(int s, char *pkt)
- {
-- int ret;
-+ int sent, ret = 1, fcarg;
- int totlength;
-
- /* set up a sample packet for testing purposes */
- totlength = (unsigned char)*pkt + 1;
-
-- if ((ret = send(s, pkt, totlength, 0)) < 0) {
-+ /* make the socket non-blocking */
-+ if (((fcarg = fcntl(s, F_GETFL, 0)) < 0 ||
-+ fcntl(s, F_SETFL, fcarg | O_NONBLOCK) < 0)) {
-+ perror("sendpacket:fcntl");
-+ return(-1);
-+ }
-+
-+ if ((sent = send(s, pkt, totlength, 0)) < 0) {
- if (errno == EWOULDBLOCK)
-- return(0);
-+ ret = 0;
- else if (errno == EPIPE)
-- return(-2);
-+ ret = -1;
- else {
- /* DEBUG temorary fix */
-- return(-2);
-+ ret = -2;
- }
-+ } else {
-+ if(sent != totlength)
-+ ret = -1;
-+ }
-+
-+ if (fcntl(s, F_SETFL, fcarg & ~O_NONBLOCK) < 0) {
-+ perror("sendpacket:fcntl");
-+ ret = -1;
- }
-- if (ret != totlength)
-- return(-1);
-- return(1);
-+
-+ return(ret);
- }
---- i2cbd-2.0_BETA3/src/serverserve.c 2006-05-11 01:42:08.000000000 +0000
-+++ i2cbd-2.0_BETA3nb2/src/serverserve.c 2006-05-11 01:30:24.000000000 +0000
-@@ -5,6 +5,7 @@
- /* active clients, new connections, and perform asynch dungeon action */
-
- #include <errno.h>
-+#include <fcntl.h>
- #include <signal.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -103,8 +104,7 @@
- static void
- sdoinput(void)
- {
-- int n;
-- register int x;
-+ int n, x, fcarg;
-
- for (x = 1; x <= highestfd; x++)
- if (FD_ISSET(x, &efdr) > 0) {
-@@ -112,7 +112,9 @@
- }
-
- /* examine set of file descriptors */
-- for (x = 1; x <= highestfd; x++)
-+ for (x = 1; x <= highestfd; x++) {
-+ int closed = 0;
-+
- if (FD_ISSET(x, &fdr) > 0) {
- if (FD_ISSET(x,&serversocks)) {
- /* new connect on advertised socket */
-@@ -121,6 +123,16 @@
- s_new_user(n);
- } else {
- /* fd is client input */
-+
-+ /* make the socket non-blocking */
-+ if (((fcarg = fcntl(x, F_GETFL, 0)) < 0 ||
-+ fcntl(x, F_SETFL, fcarg | O_NONBLOCK)
-+ < 0)) {
-+ perror("sdoinput:fcntl");
-+ disconnectuser(x);
-+ continue;
-+ }
-+
- switch(readpacket(x, &cbufs[x]))
- {
- case 1:
-@@ -136,8 +148,19 @@
- case -2:
- /* close connection */
- disconnectuser(x);
-+ closed = 1;
- break;
- }
-+
-+ if (!closed) {
-+ if(fcntl(x, F_SETFL,
-+ fcarg & ~O_NONBLOCK) < 0) {
-+ perror("sdoinput: fcntl");
-+ disconnectuser(x);
-+ }
-+ }
-+
- }
- }
-+ }
- }