aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-07-30 07:45:46 +0800
committerbapt <bapt@FreeBSD.org>2016-07-30 07:45:46 +0800
commit30f67ba862f2fa7b6d535669ab30df5df4ae0abf (patch)
tree7613f38b422db9d08f2bf586341b01468d8b9fa7 /print
parentec14d351ce4073fa08bbe28fc636ea4e617f1cdf (diff)
downloadfreebsd-ports-gnome-30f67ba862f2fa7b6d535669ab30df5df4ae0abf.tar.gz
freebsd-ports-gnome-30f67ba862f2fa7b6d535669ab30df5df4ae0abf.tar.zst
freebsd-ports-gnome-30f67ba862f2fa7b6d535669ab30df5df4ae0abf.zip
Prevent collision with getline(3)
Diffstat (limited to 'print')
-rw-r--r--print/magicfilter/files/patch-fe.c11
-rw-r--r--print/magicfilter/files/patch-getline.c14
-rw-r--r--print/magicfilter/files/patch-rule.h11
3 files changed, 33 insertions, 3 deletions
diff --git a/print/magicfilter/files/patch-fe.c b/print/magicfilter/files/patch-fe.c
new file mode 100644
index 000000000000..5df9f96ae79c
--- /dev/null
+++ b/print/magicfilter/files/patch-fe.c
@@ -0,0 +1,11 @@
+--- fe.c.orig 2003-05-09 18:27:15 UTC
++++ fe.c
+@@ -128,7 +128,7 @@ be(int input, int output)
+
+ /* read rules
+ */
+- while ( (r = getline(f)) != 0) {
++ while ( (r = get_line(f)) != 0) {
+ rulecount++;
+ if (tail) {
+ tail->next = r;
diff --git a/print/magicfilter/files/patch-getline.c b/print/magicfilter/files/patch-getline.c
index 6cb77eeffc6a..02fdb0dd9b0e 100644
--- a/print/magicfilter/files/patch-getline.c
+++ b/print/magicfilter/files/patch-getline.c
@@ -1,6 +1,5 @@
-diff -ur/getline.c getline.c
---- getline.c Sun Dec 5 01:32:50 2004
-+++ getline.c Sun Dec 5 01:33:11 2004
+--- getline.c.orig 2002-12-14 09:02:26 UTC
++++ getline.c
@@ -34,7 +34,7 @@
* /pattern/ action[/hint/] [arg {arg ...}]
*/
@@ -10,3 +9,12 @@ diff -ur/getline.c getline.c
#include <string.h>
#include <ctype.h>
#include "rule.h"
+@@ -175,7 +175,7 @@ vis(FILE *output, unsigned char *s)
+ * getline() gets a rule off the input stream
+ */
+ struct rule *
+-getline(FILE *input)
++get_line(FILE *input)
+ {
+ static char *bfr = 0; /* a buffer for reading lines into */
+ static int buflen = 0; /* size of that buffer */
diff --git a/print/magicfilter/files/patch-rule.h b/print/magicfilter/files/patch-rule.h
new file mode 100644
index 000000000000..f3b6b2057289
--- /dev/null
+++ b/print/magicfilter/files/patch-rule.h
@@ -0,0 +1,11 @@
+--- rule.h.orig 2002-07-11 23:23:43 UTC
++++ rule.h
+@@ -55,7 +55,7 @@ struct rule {
+ struct rule *next; /* next rule in the chain */
+ } ;
+
+-extern struct rule *getline(FILE *);
++extern struct rule *get_line(FILE *);
+ extern struct rule *rules;
+ char * action_p(enum rule_action);
+