From 8c7499bdfa85657ea6c2517ada0ef4a4db489beb Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Sat, 23 Sep 2000 01:36:53 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'RELEASE_4_1_1'. --- net-im/icb/files/patch-serverlist.c | 54 ------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 net-im/icb/files/patch-serverlist.c (limited to 'net-im/icb/files/patch-serverlist.c') diff --git a/net-im/icb/files/patch-serverlist.c b/net-im/icb/files/patch-serverlist.c deleted file mode 100644 index 914c877d9993..000000000000 --- a/net-im/icb/files/patch-serverlist.c +++ /dev/null @@ -1,54 +0,0 @@ -$NetBSD: patch-ai,v 1.2 1999/11/26 22:12:37 hubertf Exp $ - -diff -x *.orig -urN ./icb/serverlist.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/serverlist.c ---- ./icb/serverlist.c Fri Feb 24 22:20:29 1995 -+++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/icb/serverlist.c Fri Nov 26 22:56:29 1999 -@@ -1,4 +1,6 @@ - #include -+#include -+#include - #include - #include - #include "icb.h" -@@ -14,15 +16,14 @@ - FILE *openserverfile() - { - struct stat statbuf; -- char *personalsl; -- char command[256]; -- char pwd[256]; -+ char *personalsl, *home; -+ char pwd[MAXPATHLEN+1]; - FILE *ret; - - #ifdef sgi - #undef SYSV - #endif --#ifndef SYSV -+#if !defined(SYSV) && !(defined(BSD) && BSD >= 199306) && !defined(__linux__) - getwd(pwd); - #else /* SYSV */ - getcwd(pwd, MAXPATHLEN+1); -@@ -30,11 +31,20 @@ - #ifdef sgi - #define SYSV - #endif -- chdir(getenv("HOME")); -+ if ((home = getenv("HOME")) == NULL) { -+ struct passwd *pw; -+ if ((pw = getpwuid(getuid())) == NULL) -+ home = "."; -+ home = pw->pw_dir; -+ } -+ chdir(home); - if (!stat(PERSONALSL,&statbuf)) - { -- sprintf(command,"/bin/cat %s %s\n", PERSONALSL, SERVERLIST); -+ char *command = malloc(strlen("/bin/cat \n") + -+ strlen(PERSONALSL) + strlen(SERVERLIST) + 1); -+ sprintf(command, "/bin/cat %s %s\n", PERSONALSL, SERVERLIST); - ret= popen(command,"r"); -+ free(command); - } - else - ret= fopen(SERVERLIST,"r"); -- cgit v1.2.3