1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

Prevent collision with getline(3)

This commit is contained in:
Baptiste Daroussin 2016-05-22 16:35:29 +00:00
parent 1a6cc9cfce
commit ae5823726e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=415641
3 changed files with 39 additions and 0 deletions

11
news/nn/files/patch-aux.c Normal file
View File

@ -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)

View File

@ -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;

View File

@ -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 */