From 994b16c87c3769ac25ebbc147b41e205b65fdb7d Mon Sep 17 00:00:00 2001 From: kristerw Date: Thu, 22 Jul 2004 18:02:10 +0000 Subject: Convert some C99-isms to C89 to make this build with gcc 2.95. --- 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 deletion(-) create mode 100644 chat/mu-conference/patches/patch-aa create mode 100644 chat/mu-conference/patches/patch-ab (limited to 'chat/mu-conference') diff --git a/chat/mu-conference/distinfo b/chat/mu-conference/distinfo index df67683b01b..d5a94afe5fd 100644 --- a/chat/mu-conference/distinfo +++ b/chat/mu-conference/distinfo @@ -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 --git a/chat/mu-conference/patches/patch-aa b/chat/mu-conference/patches/patch-aa new file mode 100644 index 00000000000..782e5763496 --- /dev/null +++ b/chat/mu-conference/patches/patch-aa @@ -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 --git a/chat/mu-conference/patches/patch-ab b/chat/mu-conference/patches/patch-ab new file mode 100644 index 00000000000..17e1de2c385 --- /dev/null +++ b/chat/mu-conference/patches/patch-ab @@ -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, "", 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")); -- cgit v1.2.3