pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/chat/mu-conference Convert some C99-isms to C89 to mak...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9280f1f1f8ac
branches:  trunk
changeset: 478373:9280f1f1f8ac
user:      kristerw <kristerw%pkgsrc.org@localhost>
date:      Thu Jul 22 18:02:10 2004 +0000

description:
Convert some C99-isms to C89 to make this build with gcc 2.95.

diffstat:

 chat/mu-conference/distinfo         |   4 ++-
 chat/mu-conference/patches/patch-aa |  37 +++++++++++++++++++++++++++++++
 chat/mu-conference/patches/patch-ab |  44 +++++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 1 deletions(-)

diffs (102 lines):

diff -r 589f1d1ceb08 -r 9280f1f1f8ac chat/mu-conference/distinfo
--- a/chat/mu-conference/distinfo       Thu Jul 22 18:00:37 2004 +0000
+++ b/chat/mu-conference/distinfo       Thu Jul 22 18:02:10 2004 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/06/26 14:28:09 abs Exp $
+$NetBSD: distinfo,v 1.2 2004/07/22 18:02:10 kristerw Exp $
 
 SHA1 (mu-conference-0.6.0.tar.gz) = cc81619378a86c6c449c4122586c353102d4876e
 Size (mu-conference-0.6.0.tar.gz) = 56272 bytes
 SHA1 (jcr-0.1.2.tar.gz) = 057c4e2fb13148a105c8631cea211bdb9c28115b
 Size (jcr-0.1.2.tar.gz) = 147439 bytes
+SHA1 (patch-aa) = 51cafdb9f8f8696788b82e506c297a0d8545f8eb
+SHA1 (patch-ab) = 9cd1511636302e71106199fc08497a300b03bc28
diff -r 589f1d1ceb08 -r 9280f1f1f8ac chat/mu-conference/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/mu-conference/patches/patch-aa       Thu Jul 22 18:02:10 2004 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-aa,v 1.1 2004/07/22 18:02:10 kristerw Exp $
+
+--- src/main.c.orig    Thu Jul 22 19:54:54 2004
++++ src/main.c Thu Jul 22 19:55:36 2004
+@@ -34,12 +34,12 @@
+   struct stat st;
+   char *config_file = NULL;
+   pool p;
+-  jcr = (jcr_instance)malloc(sizeof(_jcr_instance));
+ 
+   GThread       *dthread; /* the packet delivery thread */
+   GMainLoop     *gmain;   /* the receive packet event loop */
+ 
+ 
++  jcr = (jcr_instance)malloc(sizeof(_jcr_instance));
+   fprintf(stderr, "%s -- %s\n%s\n\n", _JCOMP_NAME, _JCOMP_VERS, _JCOMP_COPY);
+ 
+   while ((c = getopt(argc, argv, "Bsd:c:")) != EOF)
+@@ -119,6 +119,7 @@
+ 
+ 
+   if (inBackground == 1) {
++    int fdlimit, fd;
+     if ((pid = fork()) == -1) {
+       fprintf(stderr, "%s: Could not start in background\n", JDBG);
+       exit(1);
+@@ -128,8 +129,8 @@
+ 
+     /* in child process .... process and terminal housekeeping */
+     setsid();
+-    int fdlimit = sysconf(_SC_OPEN_MAX);
+-    int fd = 0;
++    fdlimit = sysconf(_SC_OPEN_MAX);
++    fd = 0;
+     while (fd < fdlimit)
+       close(fd++);
+     open("/dev/null",O_RDWR);
diff -r 589f1d1ceb08 -r 9280f1f1f8ac chat/mu-conference/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/mu-conference/patches/patch-ab       Thu Jul 22 18:02:10 2004 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-ab,v 1.1 2004/07/22 18:02:10 kristerw Exp $
+
+--- jcomp/jcr_elements.c.orig  Thu Jul 22 19:49:51 2004
++++ jcomp/jcr_elements.c       Thu Jul 22 19:51:32 2004
+@@ -32,6 +32,8 @@
+     if (strncasecmp(name, "stream:stream", 13) == 0) {
+       char *pass = xmlnode_get_data(xmlnode_get_tag(jcr->config,"secret"));
+       int i = 0;
++      char hashbuf[41];
++      xmlnode cur;
+       if (attrib == NULL) return;
+       while (attrib[i] != '\0') {
+         if (strncasecmp(attrib[i], "id", 2) == 0)
+@@ -39,12 +41,11 @@
+         i += 2;
+       }
+       p = pool_new();
+-      char hashbuf[41];
+       //    log_debug(JDBG, "%s = '%s'", attrib[i], attrib[i+1]);
+       shahash_r(spools(p, attrib[i + 1], pass, p), hashbuf);
+ 
+       /* Build a handshake packet */
+-      xmlnode cur = xmlnode_new_tag("handshake");
++      cur = xmlnode_new_tag("handshake");
+       xmlnode_insert_cdata(cur, hashbuf, -1);
+ 
+       /* Transmit handshake */
+@@ -91,6 +92,7 @@
+     if (jcr->current == NULL) {
+       g_io_channel_close(jcr->gio);
+     } else {
++      xmlnode parent;
+       if (strncasecmp(name, "stream:error", 12) == 0) {
+         log_warn(JDBG, "%s", xmlnode2str(jcr->current));
+         g_io_channel_write_chars(jcr->gio, "</stream:stream>", 15, &bytes, NULL);
+@@ -100,7 +102,7 @@
+         break;
+       }
+ 
+-      xmlnode parent = xmlnode_get_parent(jcr->current);
++      parent = xmlnode_get_parent(jcr->current);
+       if (parent == NULL) {
+         x = xmlnode_dup(jcr->current);
+         to = jid_new(x->p, xmlnode_get_attrib(x, "to"));



Home | Main Index | Thread Index | Old Index