summaryrefslogtreecommitdiff
path: root/shells/rc
diff options
context:
space:
mode:
authorgarbled <garbled>1998-08-23 05:52:46 +0000
committergarbled <garbled>1998-08-23 05:52:46 +0000
commit6c7d1e564a550506e41a191b71e3ed2e824f7ccc (patch)
tree53dc8b30ee3217c1b26d599372ba74e946a2e354 /shells/rc
parent40734d53e59535d575bd47107b41953b9b700c83 (diff)
downloadpkgsrc-6c7d1e564a550506e41a191b71e3ed2e824f7ccc.tar.gz
Fix compilation on alpha. Closes PR 5768 (Tim Rightnour)
Diffstat (limited to 'shells/rc')
-rw-r--r--shells/rc/patches/patch-aa93
-rw-r--r--shells/rc/patches/patch-ab45
-rw-r--r--shells/rc/patches/patch-ac27
-rw-r--r--shells/rc/patches/patch-ad32
-rw-r--r--shells/rc/patches/patch-ae15
5 files changed, 120 insertions, 92 deletions
diff --git a/shells/rc/patches/patch-aa b/shells/rc/patches/patch-aa
index 393c844684e..45eb26649e0 100644
--- a/shells/rc/patches/patch-aa
+++ b/shells/rc/patches/patch-aa
@@ -1,5 +1,4 @@
-$NetBSD: patch-aa,v 1.5 1998/08/07 11:11:16 agc Exp $
-
+$NetBSD: patch-aa,v 1.6 1998/08/23 05:52:46 garbled Exp $
*** Makefile.orig Mon Mar 7 03:32:46 1994
--- Makefile Wed Aug 20 15:19:15 1997
***************
@@ -43,93 +42,3 @@ $NetBSD: patch-aa,v 1.5 1998/08/07 11:11:16 agc Exp $
# If rc is compiled with READLINE defined, you must supply the correct
# arguments to ld on this line. Typically this would be something like:
-*** utils.c.orig Wed Aug 20 15:26:52 1997
---- utils.c Wed Aug 20 15:28:11 1997
-***************
-*** 5,10 ****
---- 5,12 ----
- #include "rc.h"
- #include "jbwrap.h"
-
-+ #include <sys/param.h>
-+
- /* print error with line number on noninteractive shells (i.e., scripts) */
-
- extern void pr_error(char *s) {
-***************
-*** 19,26 ****
---- 21,30 ----
- /* our perror */
-
- extern void uerror(char *s) {
-+ #if !(defined(BSD) && BSD >= 199306)
- extern int sys_nerr;
- extern char *sys_errlist[];
-+ #endif
- if (errno > sys_nerr)
- return;
- if (s != NULL)
---- proto.h 1997/12/19 09:22:28 1.1
-+++ proto.h 1997/12/19 09:23:51
-@@ -13,6 +13,7 @@
- You can override these definitions with compile-line definitions
- of the same macros.
- */
-+#include <sys/param.h>
-
- #ifndef ALIGN_T
- typedef long ALIGN_T;
-@@ -65,7 +66,8 @@
- extern int getgroups(int, int *);
- /*extern int ioctl(int, long,...);*/ /* too much trouble leaving this uncommented */
- extern int isatty(int);
--#ifndef SYSVR4 /* declares AND defines this in sys/stat.h!! */
-+#if !defined(SYSVR4) && !(defined(BSD) && BSD >= 199306)
-+/* SVR4 declares AND defines this in sys/stat.h!! */
- extern int mknod(const char *, int, int);
- #endif
- extern int pipe(int *);
---- builtins.c.orig Mon Mar 7 03:32:49 1994
-+++ builtins.c Tue Feb 24 11:04:28 1998
-@@ -466,12 +466,18 @@
-
- #ifndef SYSVR4
- extern int getrlimit(int, struct rlimit *);
-+
-+/* #ifndef __FreeBSD__ */
-+#include <sys/param.h>
-+#if !(defined(BSD) && BSD >= 199306)
- extern int setrlimit(int, struct rlimit *);
- #endif
-
-+#endif
-+
- static void printlimit(const Limit *limit, bool hard) {
- struct rlimit rlim;
-- long lim;
-+ u_quad_t lim;
- getrlimit(limit->flag, &rlim);
- if (hard)
- lim = rlim.rlim_max;
-@@ -481,16 +487,19 @@
- fprint(1, "%s \tunlimited\n", limit->name);
- else {
- const Suffix *suf;
-+ char buf[1024];
- for (suf = limit->suffix; suf != NULL; suf = suf->next)
- if (lim % suf->amount == 0 && (lim != 0 || suf->amount > 1)) {
- lim /= suf->amount;
- break;
- }
-- fprint(1, "%s \t%d%s\n", limit->name, lim, (suf == NULL || lim == 0) ? "" : suf->name);
-+ (void) snprintf(buf, sizeof(buf), "%s \t%qu%s\n",
-+ limit->name, lim, (suf == NULL || lim == 0) ? "" : suf->name);
-+ fprint(1, "%s", buf);
- }
- }
-
--static long parselimit(const Limit *limit, char *s) {
-+static u_quad_t parselimit(const Limit *limit, char *s) {
- char *t;
- int len = strlen(s);
- long lim = 1;
diff --git a/shells/rc/patches/patch-ab b/shells/rc/patches/patch-ab
new file mode 100644
index 00000000000..f8f70cdf164
--- /dev/null
+++ b/shells/rc/patches/patch-ab
@@ -0,0 +1,45 @@
+$NetBSD: patch-ab,v 1.1 1998/08/23 05:52:46 garbled Exp $
+--- builtins.c.orig Mon Mar 7 03:32:49 1994
++++ builtins.c Tue Feb 24 11:04:28 1998
+@@ -466,12 +466,18 @@
+
+ #ifndef SYSVR4
+ extern int getrlimit(int, struct rlimit *);
++
++/* #ifndef __FreeBSD__ */
++#include <sys/param.h>
++#if !(defined(BSD) && BSD >= 199306)
+ extern int setrlimit(int, struct rlimit *);
+ #endif
+
++#endif
++
+ static void printlimit(const Limit *limit, bool hard) {
+ struct rlimit rlim;
+- long lim;
++ u_quad_t lim;
+ getrlimit(limit->flag, &rlim);
+ if (hard)
+ lim = rlim.rlim_max;
+@@ -481,16 +487,19 @@
+ fprint(1, "%s \tunlimited\n", limit->name);
+ else {
+ const Suffix *suf;
++ char buf[1024];
+ for (suf = limit->suffix; suf != NULL; suf = suf->next)
+ if (lim % suf->amount == 0 && (lim != 0 || suf->amount > 1)) {
+ lim /= suf->amount;
+ break;
+ }
+- fprint(1, "%s \t%d%s\n", limit->name, lim, (suf == NULL || lim == 0) ? "" : suf->name);
++ (void) snprintf(buf, sizeof(buf), "%s \t%qu%s\n",
++ limit->name, lim, (suf == NULL || lim == 0) ? "" : suf->name);
++ fprint(1, "%s", buf);
+ }
+ }
+
+-static long parselimit(const Limit *limit, char *s) {
++static u_quad_t parselimit(const Limit *limit, char *s) {
+ char *t;
+ int len = strlen(s);
+ long lim = 1;
diff --git a/shells/rc/patches/patch-ac b/shells/rc/patches/patch-ac
new file mode 100644
index 00000000000..bc7f8cab8f2
--- /dev/null
+++ b/shells/rc/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1 1998/08/23 05:52:47 garbled Exp $
+*** utils.c.orig Wed Aug 20 15:26:52 1997
+--- utils.c Wed Aug 20 15:28:11 1997
+***************
+*** 5,10 ****
+--- 5,12 ----
+ #include "rc.h"
+ #include "jbwrap.h"
+
++ #include <sys/param.h>
++
+ /* print error with line number on noninteractive shells (i.e., scripts) */
+
+ extern void pr_error(char *s) {
+***************
+*** 19,26 ****
+--- 21,30 ----
+ /* our perror */
+
+ extern void uerror(char *s) {
++ #if !(defined(BSD) && BSD >= 199306)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
++ #endif
+ if (errno > sys_nerr)
+ return;
+ if (s != NULL)
diff --git a/shells/rc/patches/patch-ad b/shells/rc/patches/patch-ad
new file mode 100644
index 00000000000..31a2e6f64bb
--- /dev/null
+++ b/shells/rc/patches/patch-ad
@@ -0,0 +1,32 @@
+$NetBSD: patch-ad,v 1.1 1998/08/23 05:52:47 garbled Exp $
+--- proto.h.orig Sun Mar 6 20:33:11 1994
++++ proto.h Mon Jul 13 02:29:15 1998
+@@ -15,2 +15,3 @@
+ */
++#include <sys/param.h>
+
+@@ -34,7 +35,10 @@
+
++#if !(defined(BSD) && BSD >= 199306)
+ extern void exit(int);
+ extern void qsort(void *, SIZE_T, SIZE_T, int (*)(const void *, const void *));
+-
++#else
++#include <stdlib.h>
++#endif
+ /* fake string.h */
+-
++#if !(defined(BSD) && BSD >= 199306)
+ extern int strncmp(const char *, const char *, SIZE_T);
+@@ -50,2 +54,5 @@
+ extern void *memset(void *, int, SIZE_T);
++#else
++#include <string.h>
++#endif
+
+@@ -67,3 +74,4 @@
+ extern int isatty(int);
+-#ifndef SYSVR4 /* declares AND defines this in sys/stat.h!! */
++#if !defined(SYSVR4) && !(defined(BSD) && BSD >= 199306)
++/* SVR4 declares AND defines this in sys/stat.h!! */
+ extern int mknod(const char *, int, int);
diff --git a/shells/rc/patches/patch-ae b/shells/rc/patches/patch-ae
new file mode 100644
index 00000000000..f74b56934a2
--- /dev/null
+++ b/shells/rc/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1 1998/08/23 05:52:47 garbled Exp $
+--- nalloc.c.orig Mon Jul 13 02:32:50 1998
++++ nalloc.c Mon Jul 13 02:34:46 1998
+@@ -113,3 +113,5 @@
+ extern void *ealloc(SIZE_T n) {
++#if !(defined(BSD) && BSD >= 199306)
+ extern void *malloc(SIZE_T);
++#endif
+ void *p = malloc(n);
+@@ -123,3 +125,5 @@
+ extern void *erealloc(void *p, SIZE_T n) {
++#if !(defined(BSD) && BSD >= 199306)
+ extern void *realloc(void *, SIZE_T);
++#endif
+ if (p == NULL) /* convenience feature */