summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2016-05-22 16:35:29 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2016-05-22 16:35:29 +0000
commitae5823726eae938c26813ecba4ffec7592dee907 (patch)
tree9c56d183fb8aaaa1db35359208225927f58c1d9b /news
parentPrevent collision with getline(3) (diff)
Prevent collision with getline(3)
Notes
Notes: svn path=/head/; revision=415641
Diffstat (limited to 'news')
-rw-r--r--news/nn/files/patch-aux.c11
-rw-r--r--news/nn/files/patch-global.c17
-rw-r--r--news/nn/files/patch-global.h11
3 files changed, 39 insertions, 0 deletions
diff --git a/news/nn/files/patch-aux.c b/news/nn/files/patch-aux.c
new file mode 100644
index 000000000000..f8012e99262f
--- /dev/null
+++ b/news/nn/files/patch-aux.c
@@ -0,0 +1,11 @@
+--- aux.c.orig 2005-07-21 22:03:00 UTC
++++ aux.c
+@@ -507,7 +507,7 @@ aux_sh(article_header * ah, char *script
+ prompt_line = Lines - 1;
+ prompt("To: ");
+ unset_raw();
+- if (getline(&cc[0], sizeof(cc)) == 0)
++ if (get_line(&cc[0], sizeof(cc)) == 0)
+ cc[0] = CR;
+ nn_raw();
+ if (cc[0] != CR)
diff --git a/news/nn/files/patch-global.c b/news/nn/files/patch-global.c
new file mode 100644
index 000000000000..6e15735dd132
--- /dev/null
+++ b/news/nn/files/patch-global.c
@@ -0,0 +1,17 @@
+--- global.c.orig 2005-04-19 22:26:50 UTC
++++ global.c
+@@ -1307,12 +1307,12 @@ fgetstr(FILE * f)
+ }
+
+ /*
+- * getline - gets a line from stdin
++ * get_line - gets a line from stdin
+ * returns the length of the line
+ */
+
+ int
+-getline(char *line, int max)
++get_line(char *line, int max)
+ {
+ if (fgets(line, max, stdin) == NULL)
+ return 0;
diff --git a/news/nn/files/patch-global.h b/news/nn/files/patch-global.h
new file mode 100644
index 000000000000..2b4f0ad72069
--- /dev/null
+++ b/news/nn/files/patch-global.h
@@ -0,0 +1,11 @@
+--- global.h.orig 2005-04-01 05:39:01 UTC
++++ global.h
+@@ -258,7 +258,7 @@ int nn_truncate(char *, off_
+ char *strsave(char *);
+ char *str3save(char *, char *, char *);
+ char *fgetstr(FILE *);
+-int getline(char *, int);
++int get_line(char *, int);
+ extern char *tmp_directory;
+ extern char *nntp_cache_dir;
+ #endif /* _NN_GLOBAL_H */