Date: Sun, 22 May 2016 16:35:30 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415641 - head/news/nn/files Message-ID: <201605221635.u4MGZUav046884@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Sun May 22 16:35:29 2016 New Revision: 415641 URL: https://svnweb.freebsd.org/changeset/ports/415641 Log: Prevent collision with getline(3) Added: head/news/nn/files/patch-aux.c (contents, props changed) head/news/nn/files/patch-global.c (contents, props changed) head/news/nn/files/patch-global.h (contents, props changed) Added: head/news/nn/files/patch-aux.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/nn/files/patch-aux.c Sun May 22 16:35:29 2016 (r415641) @@ -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) Added: head/news/nn/files/patch-global.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/nn/files/patch-global.c Sun May 22 16:35:29 2016 (r415641) @@ -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; Added: head/news/nn/files/patch-global.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/nn/files/patch-global.h Sun May 22 16:35:29 2016 (r415641) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605221635.u4MGZUav046884>