summaryrefslogtreecommitdiff
path: root/net/icb
diff options
context:
space:
mode:
authorhubertf <hubertf>1999-06-01 12:14:00 +0000
committerhubertf <hubertf>1999-06-01 12:14:00 +0000
commit1282b31f75a2c57e7bb290e3565f7f6101a9e733 (patch)
treea5fe38b2c7cf059d4c24151e14ef41891d3c629b /net/icb
parent36c0a1548c66b1c9465cf7010df5771413e60925 (diff)
downloadpkgsrc-1282b31f75a2c57e7bb290e3565f7f6101a9e733.tar.gz
Remove some compilation warnings, use mkstemp instead of mktemp.
Patches submitted by Jaromir Dolecek <dolecek@ics.muni.cz> in PR 7683
Diffstat (limited to 'net/icb')
-rw-r--r--net/icb/files/config8
-rw-r--r--net/icb/patches/patch-aa47
-rw-r--r--net/icb/patches/patch-ad129
-rw-r--r--net/icb/patches/patch-ag11
-rw-r--r--net/icb/patches/patch-ah11
5 files changed, 119 insertions, 87 deletions
diff --git a/net/icb/files/config b/net/icb/files/config
index ab5a5282b96..8a7af667a49 100644
--- a/net/icb/files/config
+++ b/net/icb/files/config
@@ -1,4 +1,4 @@
-# $NetBSD: config,v 1.2 1998/08/07 11:10:40 agc Exp $
+# $NetBSD: config,v 1.3 1999/06/01 12:14:00 hubertf Exp $
#
# THIS IS AN AUTOMATICALLY GENERATED FILE
#
@@ -20,11 +20,11 @@ MANDIR = @PREFIX@/man
CC = cc
# Compile options.
-CFLAGS = -O2 -DNO_LRAND48 -DSTRINGS_H -DTIME_H
-TCLCFLAGS = -O2 -DNO_LRAND48 -DSTRINGS_H -DTIME_H
+CFLAGS = -O2 -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
+TCLCFLAGS = -O2 -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
# Lint flags
-LFLAGS = -u -DNO_LRAND48 -DSTRINGS_H -DTIME_H
+LFLAGS = -u -DNO_LRAND48 -DSTRINGS_H -DTIME_H -DVOID_SIGHANDLER=1
# System dependent source file.
SYSDEP =sysdep.bsd
diff --git a/net/icb/patches/patch-aa b/net/icb/patches/patch-aa
index 19fd89f22c3..b5e8b251449 100644
--- a/net/icb/patches/patch-aa
+++ b/net/icb/patches/patch-aa
@@ -1,12 +1,14 @@
-$NetBSD: patch-aa,v 1.5 1999/02/10 22:31:56 jwise Exp $
-
--- tcl/tclCmdAH.c.orig Fri Feb 24 22:19:53 1995
-+++ tcl/tclCmdAH.c Wed Apr 15 12:26:09 1998
-@@ -38,8 +38,15 @@
++++ tcl/tclCmdAH.c Tue Jun 1 10:55:15 1999
+@@ -38,9 +38,22 @@ static char rcsid[] = "$Header: /home/ag
#include <sys/wait.h>
#include "tclInt.h"
-+#if (defined(__unix__) || defined(unix) || defined(__NetBSD__)) && !defined(USG)
++#ifdef __NetBSD__
++#define unix
++#endif
++
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#include <unistd.h>
+#endif
@@ -15,6 +17,41 @@ $NetBSD: patch-aa,v 1.5 1999/02/10 22:31:56 jwise Exp $
+#if !(defined(BSD) && BSD >= 199306)
extern long lseek();
+#endif
++#ifndef BSD4_4
extern char *mktemp();
++#endif
/*
+ *----------------------------------------------------------------------
+@@ -430,7 +443,7 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
+ int pid = -1; /* -1 means child process doesn't
+ * exist (yet). Non-zero gives its
+ * id (0 only in child). */
+- union wait status;
++ int status;
+ char *cmdName, *execName;
+
+ /*
+@@ -501,8 +514,13 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
+ } else {
+ char tmp[sizeof(TMP_FILE_NAME) + 1];
+ strcpy(tmp, TMP_FILE_NAME);
++#ifdef BSD4_4
++ mkstemp(tmp);
++ stdIn[0] = mkstemp(tmp);
++#else
+ mktemp(tmp);
+ stdIn[0] = open(tmp, O_RDWR|O_CREAT, 0);
++#endif
+ if (stdIn[0] < 0) {
+ sprintf(interp->result,
+ "couldn't create input file for \"%.50s\" command: %.50s",
+@@ -642,7 +660,7 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
+ sprintf(interp->result, "command terminated abnormally");
+ result = TCL_ERROR;
+ }
+- result = status.w_retcode;
++ result = WEXITSTATUS(status);
+ }
+ if (stdIn[0] != -1) {
+ close(stdIn[0]);
diff --git a/net/icb/patches/patch-ad b/net/icb/patches/patch-ad
index d83be14f40b..35274c18bd4 100644
--- a/net/icb/patches/patch-ad
+++ b/net/icb/patches/patch-ad
@@ -1,78 +1,51 @@
-$NetBSD: patch-ad,v 1.2 1998/11/12 23:40:20 frueauf Exp $
-
-*** icb/serverlist.c.orig Fri Feb 24 16:20:29 1995
---- icb/serverlist.c Thu Sep 3 10:37:50 1998
-***************
-*** 1,4 ****
---- 1,5 ----
- #include <stdio.h>
-+ #include <pwd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include "icb.h"
-***************
-*** 14,28 ****
- FILE *openserverfile()
- {
- struct stat statbuf;
-! char *personalsl;
-! char command[256];
-! char pwd[256];
- FILE *ret;
-
- #ifdef sgi
- #undef SYSV
- #endif
-! #ifndef SYSV
- getwd(pwd);
- #else /* SYSV */
- getcwd(pwd, MAXPATHLEN+1);
---- 15,28 ----
- FILE *openserverfile()
- {
- struct stat statbuf;
-! char *personalsl, *home;
-! char pwd[MAXPATHLEN+1];
- FILE *ret;
-
- #ifdef sgi
- #undef SYSV
- #endif
-! #if !defined(SYSV) && !(defined(BSD) && BSD >= 199306)
- getwd(pwd);
- #else /* SYSV */
- getcwd(pwd, MAXPATHLEN+1);
-***************
-*** 30,40 ****
- #ifdef sgi
- #define SYSV
- #endif
-! chdir(getenv("HOME"));
- if (!stat(PERSONALSL,&statbuf))
- {
-! sprintf(command,"/bin/cat %s %s\n", PERSONALSL, SERVERLIST);
- ret= popen(command,"r");
- }
- else
- ret= fopen(SERVERLIST,"r");
---- 30,49 ----
- #ifdef sgi
- #define SYSV
- #endif
-! if ((home = getenv("HOME")) == NULL) {
-! struct passwd *pw;
-! if ((pw = getpwuid(getuid())) == NULL)
-! home = ".";
-! home = pw->pw_dir;
-! }
-! chdir(home);
- if (!stat(PERSONALSL,&statbuf))
- {
-! 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");
+--- icb/serverlist.c.orig Fri Feb 24 22:20:29 1995
++++ icb/serverlist.c Tue Jun 1 10:43:14 1999
+@@ -1,4 +1,6 @@
+ #include <stdio.h>
++#include <stdlib.h>
++#include <pwd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include "icb.h"
+@@ -14,15 +16,14 @@ static FILE *serverfile = NULL;
+ 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)
+ getwd(pwd);
+ #else /* SYSV */
+ getcwd(pwd, MAXPATHLEN+1);
+@@ -30,11 +31,20 @@ FILE *openserverfile()
+ #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");
diff --git a/net/icb/patches/patch-ag b/net/icb/patches/patch-ag
new file mode 100644
index 00000000000..04ee5ae611a
--- /dev/null
+++ b/net/icb/patches/patch-ag
@@ -0,0 +1,11 @@
+--- icb/c_shell.c.orig Tue Jun 1 10:38:15 1999
++++ icb/c_shell.c Tue Jun 1 10:38:47 1999
+@@ -14,7 +14,7 @@ TARGDEFS
+ static char *usage = "usage: c_shell [command]";
+ int w, pid;
+ int shellout = 0;
+- union wait status;
++ int status;
+ char *shell, *getenv();
+
+ /* disallow use if restricted mode set */
diff --git a/net/icb/patches/patch-ah b/net/icb/patches/patch-ah
new file mode 100644
index 00000000000..0e3036fb9a6
--- /dev/null
+++ b/net/icb/patches/patch-ah
@@ -0,0 +1,11 @@
+--- murgil/getrname.c.orig Tue Jun 1 10:28:17 1999
++++ murgil/getrname.c Tue Jun 1 10:34:27 1999
+@@ -14,7 +14,7 @@ int s; /* connected socket fd */
+ {
+ static char rname[24];
+ struct hostent *host;
+-#if defined(linux)
++#if defined(linux) || defined(__NetBSD__)
+ #define PEER_CAST (struct sockaddr *)
+ #define HOST_CAST (char *)
+ #else