summaryrefslogtreecommitdiff
path: root/chat/icb/patches/patch-bb
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2005-12-14 13:53:24 +0000
committerjoerg <joerg@pkgsrc.org>2005-12-14 13:53:24 +0000
commit21320c56858c351e2e73c27218b145f537ce5eca (patch)
tree6ffead8acb194ec1fbac48ce0775c37129785ba2 /chat/icb/patches/patch-bb
parentf288b33132eb60bc118bfe9876728638af40ffe9 (diff)
downloadpkgsrc-21320c56858c351e2e73c27218b145f537ce5eca.tar.gz
Teach the backbone of NetBSD communication some ISO C tricks.
- no errno, use errno.h - no redefinition of function parameters as local variables [how did this ever work?!] - malloc comes from stdlib.h - NAME_MAX is prefered when available, it is POSIX - strchr, strpbrk, strspn, strstr, strtol and strtoul can and should be used from libc. - remove tcl version of string.h, system header is good enough (and if it doesn't have index, it would have been broken anyway)
Diffstat (limited to 'chat/icb/patches/patch-bb')
-rw-r--r--chat/icb/patches/patch-bb24
1 files changed, 24 insertions, 0 deletions
diff --git a/chat/icb/patches/patch-bb b/chat/icb/patches/patch-bb
new file mode 100644
index 00000000000..0472133837b
--- /dev/null
+++ b/chat/icb/patches/patch-bb
@@ -0,0 +1,24 @@
+$NetBSD: patch-bb,v 1.1 2005/12/14 13:53:24 joerg Exp $
+
+--- icb/unix.c.orig 2005-12-13 16:41:59.000000000 +0000
++++ icb/unix.c
+@@ -6,6 +6,7 @@
+
+ #include <sys/types.h>
+ #include <sys/param.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include "icb.h"
+ #include "externs.h"
+@@ -219,7 +220,11 @@ char *s;
+ struct passwd *pw;
+ char login[17];
+ char *p = login;
++#ifdef NAME_MAX
++ static char path[NAME_MAX + 1];
++#else
+ static char path[MAXNAMLEN+1];
++#endif
+
+ /* has to start with a tilde */
+ if (*s++ != '~')