summaryrefslogtreecommitdiff
path: root/editors/mg/patches
diff options
context:
space:
mode:
authorjperkin <jperkin>2014-07-07 18:06:58 +0000
committerjperkin <jperkin>2014-07-07 18:06:58 +0000
commitcad5409fcef67e700ab22d79e073a6c0436158a5 (patch)
treec1a726cc5572a6c5b5f492cc2f8dc61a1b7d5e79 /editors/mg/patches
parenta2e2a6065a427640cce16fd270c001179fbf05c9 (diff)
downloadpkgsrc-cad5409fcef67e700ab22d79e073a6c0436158a5.tar.gz
Various fixes for SunOS support.
Diffstat (limited to 'editors/mg/patches')
-rw-r--r--editors/mg/patches/patch-ad13
-rw-r--r--editors/mg/patches/patch-af16
-rw-r--r--editors/mg/patches/patch-ah22
-rw-r--r--editors/mg/patches/patch-basic.c14
-rw-r--r--editors/mg/patches/patch-echo.c17
-rw-r--r--editors/mg/patches/patch-fgetln.c15
-rw-r--r--editors/mg/patches/patch-line.c14
-rw-r--r--editors/mg/patches/patch-main.c14
-rw-r--r--editors/mg/patches/patch-paragraph.c15
-rw-r--r--editors/mg/patches/patch-ttyio.c16
10 files changed, 150 insertions, 6 deletions
diff --git a/editors/mg/patches/patch-ad b/editors/mg/patches/patch-ad
index 1c1a3af8fe2..5fb66ef8034 100644
--- a/editors/mg/patches/patch-ad
+++ b/editors/mg/patches/patch-ad
@@ -1,11 +1,20 @@
-$NetBSD: patch-ad,v 1.3 2012/12/12 12:47:50 wiz Exp $
+$NetBSD: patch-ad,v 1.4 2014/07/07 18:06:58 jperkin Exp $
- use toupper() correctly
- suppress initialization warning that sometimes (?) arises with gcc 4.5
+- include limits.h for INT_{MIN,MAX}
--- extend.c.orig 2011-06-18 09:18:54.000000000 +0000
+++ extend.c
-@@ -445,7 +445,7 @@ dobindkey(KEYMAP *map, const char *func,
+@@ -12,6 +12,7 @@
+
+ #include <sys/types.h>
+ #include <ctype.h>
++#include <limits.h>
+
+ #ifndef NO_MACRO
+ #include "macro.h"
+@@ -445,7 +446,7 @@ dobindkey(KEYMAP *map, const char *func,
for (i = 0; *str && i < MAXKEY; i++) {
/* XXX - convert numbers w/ strol()? */
if (*str == '^' && *(str + 1) != '\0') {
diff --git a/editors/mg/patches/patch-af b/editors/mg/patches/patch-af
index c08e1f29ca5..47f91f39e1b 100644
--- a/editors/mg/patches/patch-af
+++ b/editors/mg/patches/patch-af
@@ -1,8 +1,18 @@
-$NetBSD: patch-af,v 1.2 2012/12/12 12:47:50 wiz Exp $
+$NetBSD: patch-af,v 1.3 2014/07/07 18:06:58 jperkin Exp $
+
+Include limits.h for INT_{MIN,MAX}
--- grep.c.orig 2011-01-02 22:57:56.000000000 +0000
+++ grep.c
-@@ -152,7 +152,7 @@ gid(int f, int n)
+@@ -8,6 +8,7 @@
+
+ #include <sys/types.h>
+ #include <ctype.h>
++#include <limits.h>
+
+ #include "libgen.h"
+
+@@ -152,7 +153,7 @@ gid(int f, int n)
/* Skip backwards over delimiters we are currently on */
while (i > 0) {
c = lgetc(curwp->w_dotp, i);
@@ -11,7 +21,7 @@ $NetBSD: patch-af,v 1.2 2012/12/12 12:47:50 wiz Exp $
break;
i--;
-@@ -161,14 +161,14 @@ gid(int f, int n)
+@@ -161,14 +162,14 @@ gid(int f, int n)
/* Skip the symbol itself */
for (; i > 0; i--) {
c = lgetc(curwp->w_dotp, i - 1);
diff --git a/editors/mg/patches/patch-ah b/editors/mg/patches/patch-ah
index a63918e899c..f87f98e229c 100644
--- a/editors/mg/patches/patch-ah
+++ b/editors/mg/patches/patch-ah
@@ -1,4 +1,6 @@
-$NetBSD: patch-ah,v 1.2 2012/12/12 12:47:50 wiz Exp $
+$NetBSD: patch-ah,v 1.3 2014/07/07 18:06:58 jperkin Exp $
+
+Support SunOS.
--- fileio.c.orig 2011-09-05 18:26:37.000000000 +0000
+++ fileio.c
@@ -25,3 +27,21 @@ $NetBSD: patch-ah,v 1.2 2012/12/12 12:47:50 wiz Exp $
return (NULL);
/* loop over the specified directory, making up the list of files */
+@@ -570,7 +570,7 @@ make_file_list(char *buf)
+ #if defined (__CYGWIN__) /* Cygwin lacks reclen/namlen. */
+ if (strlen(dent->d_name) < len
+ || memcmp(cp, dent->d_name, len) != 0)
+-#elif defined (__GLIBC__) /* Linux uses reclen instead. */
++#elif defined (__GLIBC__) || defined(__sun) /* Linux uses reclen instead. */
+ if (dent->d_reclen < len || memcmp(cp, dent->d_name, len) != 0)
+ #else
+ if (dent->d_namlen < len || memcmp(cp, dent->d_name, len) != 0)
+@@ -579,7 +579,7 @@ make_file_list(char *buf)
+
+ isdir = 0;
+
+-#ifndef __CYGWIN__ /* No support for d_type in Cygwin, do all
++#if !defined(__CYGWIN__) && !defined(__sun) /* No support for d_type in Cygwin, do all
+ type cheking with stat. */
+ if (dent->d_type == DT_DIR) {
+ isdir = 1;
diff --git a/editors/mg/patches/patch-basic.c b/editors/mg/patches/patch-basic.c
new file mode 100644
index 00000000000..1b8fd46cb03
--- /dev/null
+++ b/editors/mg/patches/patch-basic.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-basic.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+Include limits.h for INT_{MIN,MAX}
+
+--- basic.c.orig 2011-01-02 22:57:56.000000000 +0000
++++ basic.c
+@@ -14,6 +14,7 @@
+ #include "def.h"
+
+ #include <ctype.h>
++#include <limits.h>
+
+ /*
+ * Go to beginning of line.
diff --git a/editors/mg/patches/patch-echo.c b/editors/mg/patches/patch-echo.c
new file mode 100644
index 00000000000..5f46477a7c9
--- /dev/null
+++ b/editors/mg/patches/patch-echo.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-echo.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+Compat define for MAX()
+
+--- echo.c.orig 2011-01-02 22:57:56.000000000 +0000
++++ echo.c
+@@ -20,6 +20,10 @@
+ #include <stdarg.h>
+ #include <term.h>
+
++#ifndef MAX
++#define MAX(x,y) ((x) > (y) ? (x) : (y))
++#endif
++
+ static char *veread(const char *, char *, size_t, int, va_list);
+ static int complt(int, int, char *, size_t, int, int *);
+ static int complt_list(int, char *, int);
diff --git a/editors/mg/patches/patch-fgetln.c b/editors/mg/patches/patch-fgetln.c
new file mode 100644
index 00000000000..e8d143f0683
--- /dev/null
+++ b/editors/mg/patches/patch-fgetln.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-fgetln.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+SunOS needs fgetln support.
+
+--- fgetln.c.orig 2008-12-30 12:41:23.000000000 +0000
++++ fgetln.c
+@@ -27,7 +27,7 @@
+ #include <stdio.h>
+ #include <string.h>
+
+-#if defined (__GLIBC__) || defined (__CYGWIN__) /* FreeWRT: only build
++#if defined (__GLIBC__) || defined (__CYGWIN__) || defined(__sun) /* FreeWRT: only build
+ this where needed */
+ char *fgetln(FILE *, size_t *);
+
diff --git a/editors/mg/patches/patch-line.c b/editors/mg/patches/patch-line.c
new file mode 100644
index 00000000000..dc35068198d
--- /dev/null
+++ b/editors/mg/patches/patch-line.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-line.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+Include limits.h for INT_{MIN,MAX}
+
+--- line.c.orig 2011-01-20 04:36:13.000000000 +0000
++++ line.c
+@@ -20,6 +20,7 @@
+
+ #include "def.h"
+
++#include <limits.h>
+ #include <stdlib.h>
+ #include <string.h>
+
diff --git a/editors/mg/patches/patch-main.c b/editors/mg/patches/patch-main.c
new file mode 100644
index 00000000000..2073cc4951e
--- /dev/null
+++ b/editors/mg/patches/patch-main.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-main.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+Include limits.h for INT_{MIN,MAX}
+
+--- main.c.orig 2011-01-02 22:57:56.000000000 +0000
++++ main.c
+@@ -15,6 +15,7 @@
+ #endif /* NO_MACRO */
+
+ #include <err.h>
++#include <limits.h>
+
+ int thisflag; /* flags, this command */
+ int lastflag; /* flags, last command */
diff --git a/editors/mg/patches/patch-paragraph.c b/editors/mg/patches/patch-paragraph.c
new file mode 100644
index 00000000000..4c41d9c4bbe
--- /dev/null
+++ b/editors/mg/patches/patch-paragraph.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-paragraph.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+Include limits.h for INT_{MIN,MAX}
+
+--- paragraph.c.orig 2011-01-02 22:57:56.000000000 +0000
++++ paragraph.c
+@@ -9,6 +9,8 @@
+
+ #include "def.h"
+
++#include <limits.h>
++
+ static int fillcol = 70;
+
+ #define MAXWORD 256
diff --git a/editors/mg/patches/patch-ttyio.c b/editors/mg/patches/patch-ttyio.c
new file mode 100644
index 00000000000..baddfcdc8b1
--- /dev/null
+++ b/editors/mg/patches/patch-ttyio.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-ttyio.c,v 1.1 2014/07/07 18:06:58 jperkin Exp $
+
+SunOS needs sys/filio.h for FIONREAD.
+
+--- ttyio.c.orig 2008-12-11 08:59:08.000000000 +0000
++++ ttyio.c
+@@ -14,6 +14,9 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
++#ifdef __sun
++#include <sys/filio.h>
++#endif
+ #include <fcntl.h>
+ #include <termios.h>
+ #include <term.h>