aboutsummaryrefslogtreecommitdiff
path: root/news/newspost
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-07-29 23:39:33 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-07-29 23:39:33 +0000
commitfc4a26e958ca411d86919afeeb50db4ff8c74069 (patch)
treeaac909110e4b23439184cf014dda1090150d68dd /news/newspost
parente56fefa8c390c4a669ac6b8e1557eaa98750da6d (diff)
downloadports-fc4a26e958ca411d86919afeeb50db4ff8c74069.tar.gz
ports-fc4a26e958ca411d86919afeeb50db4ff8c74069.zip
Prevent collision with getline(3)
Notes
Notes: svn path=/head/; revision=419282
Diffstat (limited to 'news/newspost')
-rw-r--r--news/newspost/files/patch-base_newspost.c11
-rw-r--r--news/newspost/files/patch-base_utils.c11
-rw-r--r--news/newspost/files/patch-base_utils.h11
-rw-r--r--news/newspost/files/patch-ui_options.c20
4 files changed, 53 insertions, 0 deletions
diff --git a/news/newspost/files/patch-base_newspost.c b/news/newspost/files/patch-base_newspost.c
new file mode 100644
index 000000000000..0f1a9e9341c0
--- /dev/null
+++ b/news/newspost/files/patch-base_newspost.c
@@ -0,0 +1,11 @@
+--- base/newspost.c.orig 2003-04-23 15:33:23 UTC
++++ base/newspost.c
+@@ -342,7 +342,7 @@ static Buff *read_text_file(Buff *text_b
+ file = fopen(filename, "r");
+ if (file != NULL) {
+ while (!feof(file)) {
+- line = getline(line, file);
++ line = get_line(line, file);
+ if(line == NULL){
+ text_buffer = buff_add(text_buffer, "\r\n");
+ continue;
diff --git a/news/newspost/files/patch-base_utils.c b/news/newspost/files/patch-base_utils.c
new file mode 100644
index 000000000000..9288095a7c66
--- /dev/null
+++ b/news/newspost/files/patch-base_utils.c
@@ -0,0 +1,11 @@
+--- base/utils.c.orig 2003-04-23 15:33:23 UTC
++++ base/utils.c
+@@ -43,7 +43,7 @@ file_entry * file_entry_free(file_entry
+ return NULL;
+ }
+
+-Buff * getline(Buff *buff, FILE *file){
++Buff * get_line(Buff *buff, FILE *file){
+ char c = fgetc(file);
+ buff = buff_free(buff);
+ while(TRUE){
diff --git a/news/newspost/files/patch-base_utils.h b/news/newspost/files/patch-base_utils.h
new file mode 100644
index 000000000000..c590c6441333
--- /dev/null
+++ b/news/newspost/files/patch-base_utils.h
@@ -0,0 +1,11 @@
+--- base/utils.h.orig 2003-02-08 15:09:41 UTC
++++ base/utils.h
+@@ -26,7 +26,7 @@ file_entry;
+ file_entry * file_entry_alloc();
+ file_entry * file_entry_free(file_entry *fe);
+
+-Buff * getline(Buff *buff, FILE *file);
++Buff * get_line(Buff *buff, FILE *file);
+ Buff *buff_add(Buff *buff, char *data, ... );
+ Buff * buff_free(Buff *buff);
+ Buff *buff_create(Buff *buff, char *data, ... );
diff --git a/news/newspost/files/patch-ui_options.c b/news/newspost/files/patch-ui_options.c
new file mode 100644
index 000000000000..ceded22d39ec
--- /dev/null
+++ b/news/newspost/files/patch-ui_options.c
@@ -0,0 +1,20 @@
+--- ui/options.c.orig 2003-04-23 15:33:33 UTC
++++ ui/options.c
+@@ -332,7 +332,7 @@ void parse_defaults(newspost_data *data)
+ file = fopen(filename->data, "r");
+ if (file != NULL) {
+ while (!feof(file)) {
+- line = getline(line, file);
++ line = get_line(line, file);
+ linenum++;
+ if(line == NULL) continue;
+
+@@ -429,7 +429,7 @@ void parse_defaults(newspost_data *data)
+ linenum = 0;
+ while (linenum < 8) {
+ linenum++;
+- line = getline(line, file);
++ line = get_line(line, file);
+ if(line == NULL) continue;
+
+ switch (linenum) {