summaryrefslogtreecommitdiff
path: root/sysutils/psmisc/patches/patch-ae
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/psmisc/patches/patch-ae')
-rw-r--r--sysutils/psmisc/patches/patch-ae93
1 files changed, 19 insertions, 74 deletions
diff --git a/sysutils/psmisc/patches/patch-ae b/sysutils/psmisc/patches/patch-ae
index ded175b7645..56ee499f3ba 100644
--- a/sysutils/psmisc/patches/patch-ae
+++ b/sysutils/psmisc/patches/patch-ae
@@ -1,80 +1,25 @@
-$NetBSD: patch-ae,v 1.2 1998/08/07 11:14:08 agc Exp $
+$NetBSD: patch-ae,v 1.3 2001/04/24 16:59:35 jlam Exp $
---- signals.c.orig Tue Mar 28 21:32:06 1995
-+++ signals.c Sun Jul 19 14:07:51 1998
-@@ -2,14 +2,18 @@
-
- /* Copyright 1993-1995 Werner Almesberger. See file COPYING for details. */
-
--
-+#include <signal.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #include "signals.h"
-
-+#ifdef __NetBSD__
-+#define HAVE_SYS_SIGNAME
-+#endif
-
-+#ifndef HAVE_SYS_SIGNAME
- typedef struct {
- int number;
- const char *name;
-@@ -19,9 +23,25 @@
- static SIGNAME signals[] = {
- #include "signames.h"
- { 0,NULL }};
--
-+#endif
-
- void list_signals(void)
-+#ifdef HAVE_SYS_SIGNAME
-+{
-+ int i, col;
+--- src/procfs.h.orig Tue Apr 24 12:31:50 2001
++++ src/procfs.h
+@@ -0,0 +1,20 @@
++#include <sys/param.h>
+
-+ col = 0;
-+ for (i = 1; i < NSIG; i++) {
-+ if (col+strlen(sys_signame[i])+1 > 80) {
-+ putchar('\n');
-+ col = 0;
-+ }
-+ printf("%s%s",col ? " " : "",sys_signame[i]);
-+ col += strlen(sys_signame[i])+1;
-+ }
-+ putchar('\n');
-+}
-+#else
- {
- SIGNAME *walk;
- int col;
-@@ -37,9 +57,22 @@
- }
- putchar('\n');
- }
--
++#if (defined(BSD) && BSD >= 199306)
++#define BSD_44_PROCFS
++#if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104180000)
++#define BSD_PROCFS_CMDLINE
++#endif
+#endif
-
- int get_signal(char *name,const char *cmd)
-+#ifdef HAVE_SYS_SIGNAME
-+{
-+ int i;
+
-+ if (isdigit(*name))
-+ return atoi(name);
-+ for (i = 1; i < NSIG; i++)
-+ if (!strcmp(sys_signame[i],name)) break;
-+ if (i < NSIG) return i;
-+ fprintf(stderr,"%s: unknown signal; %s -l lists signals.\n",name,cmd);
-+ exit(1);
-+}
++#ifdef BSD_44_PROCFS
++#define PROC_BASE "/proc"
++#define CMDLINE_FILE "cmdline"
++#define EXE_FILE "file"
++#define STATUS_FILE "status"
+#else
- {
- SIGNAME *walk;
-
-@@ -51,3 +84,4 @@
- fprintf(stderr,"%s: unknown signal; %s -l lists signals.\n",name,cmd);
- exit(1);
- }
++#define PROC_BASE "/proc"
++#define CMDLINE_FILE "cmdline"
++#define EXE_FILE "exe"
++#define STATUS_FILE "stat"
+#endif