pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/chat/icbirc Add a small function from OpenSSH for syst...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/82bb566d3c9a
branches:  trunk
changeset: 550177:82bb566d3c9a
user:      adrianp <adrianp%pkgsrc.org@localhost>
date:      Sun Nov 16 19:16:49 2008 +0000

description:
Add a small function from OpenSSH for systems that don't support __progname
Initially this is for SunOS only so this package can build on OpenSolaris.
PKGREVISION++

diffstat:

 chat/icbirc/Makefile         |   4 ++-
 chat/icbirc/distinfo         |   4 +-
 chat/icbirc/patches/patch-aa |  60 +++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 62 insertions(+), 6 deletions(-)

diffs (105 lines):

diff -r 5a39722411b2 -r 82bb566d3c9a chat/icbirc/Makefile
--- a/chat/icbirc/Makefile      Sun Nov 16 17:32:01 2008 +0000
+++ b/chat/icbirc/Makefile      Sun Nov 16 19:16:49 2008 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2008/03/03 02:19:51 jlam Exp $
+# $NetBSD: Makefile,v 1.16 2008/11/16 19:16:49 adrianp Exp $
 
 DISTNAME=      icbirc-1.8
+PKGREVISION=   1
 CATEGORIES=    chat
 MASTER_SITES=  http://www.benzedrine.cx/
 
@@ -20,6 +21,7 @@
 
 CPPFLAGS.Interix+=     -Dsocklen_t=int
 LDFLAGS.SunOS+=                -lresolv -lsocket -lnsl
+CFLAGS.SunOS+=         -DNEED_PROGNAME
 
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man8
 
diff -r 5a39722411b2 -r 82bb566d3c9a chat/icbirc/distinfo
--- a/chat/icbirc/distinfo      Sun Nov 16 17:32:01 2008 +0000
+++ b/chat/icbirc/distinfo      Sun Nov 16 19:16:49 2008 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.7 2005/12/05 20:49:53 rillig Exp $
+$NetBSD: distinfo,v 1.8 2008/11/16 19:16:49 adrianp Exp $
 
 SHA1 (icbirc-1.8.tar.gz) = 99ff8674b189fdf8a86b6acd2bc19418b888c38b
 RMD160 (icbirc-1.8.tar.gz) = 769c35949b79b9e401d99026800e61063e6d1103
 Size (icbirc-1.8.tar.gz) = 11061 bytes
-SHA1 (patch-aa) = 97441a0fb639095fc9e10290aa0d8b125f59285b
+SHA1 (patch-aa) = 19aa0b6fae7f7f85af3546116e0c7d76f5b9c523
diff -r 5a39722411b2 -r 82bb566d3c9a chat/icbirc/patches/patch-aa
--- a/chat/icbirc/patches/patch-aa      Sun Nov 16 17:32:01 2008 +0000
+++ b/chat/icbirc/patches/patch-aa      Sun Nov 16 19:16:49 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.5 2005/12/05 20:49:53 rillig Exp $
+$NetBSD: patch-aa,v 1.6 2008/11/16 19:16:49 adrianp Exp $
 
---- icbirc.c.orig      Thu Nov 18 16:14:28 2004
+--- icbirc.c.orig      2004-11-18 21:14:28.000000000 +0000
 +++ icbirc.c
-@@ -35,6 +35,7 @@
+@@ -35,6 +35,7 @@ static const char rcsid[] = "$Id: icbirc
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <sys/stat.h>
@@ -10,3 +10,57 @@
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <ctype.h>
+@@ -51,18 +52,42 @@ static const char rcsid[] = "$Id: icbirc
+ #include "icb.h"
+ #include "irc.h"
+ 
++#ifdef NEED_PROGNAME
++char *__progname;
++#else
++extern char *__progname;
++#endif
++
+ int           sync_write(int, const char *, int);
+ static void   usage(void);
+ static void   handle_client(int);
++char          *get_progname(char *);
+ 
+ int terminate_client;
+ static struct sockaddr_in sa_connect;
+ 
++char 
++*get_progname(char *argv0)
++{
++#ifndef NEED_PROGNAME
++      return __progname;
++#else
++      char *p;
++
++      if (argv0 == NULL)
++              return "unknown";       /* XXX */
++      p = strrchr(argv0, '/');
++      if (p == NULL)
++              p = argv0;
++      else
++              p++;
++      return p;
++#endif
++}
++
+ static void
+ usage(void)
+ {
+-      extern char *__progname;
+-
+       fprintf(stderr, "usage: %s [-d] [-l address] [-p port] "
+           "-s server [-P port]\n", __progname);
+       exit(1);
+@@ -80,6 +105,8 @@ main(int argc, char *argv[])
+       socklen_t len;
+       int val;
+ 
++      __progname = get_progname(argv[0]);
++
+       while ((ch = getopt(argc, argv, "dl:p:s:P:")) != -1) {
+               switch (ch) {
+               case 'd':



Home | Main Index | Thread Index | Old Index