From owner-svn-ports-head@freebsd.org Fri Jul 29 23:39:35 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25B36BA7BCB; Fri, 29 Jul 2016 23:39:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAE6F11BE; Fri, 29 Jul 2016 23:39:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6TNdYvq026412; Fri, 29 Jul 2016 23:39:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6TNdXOc026408; Fri, 29 Jul 2016 23:39:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607292339.u6TNdXOc026408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 29 Jul 2016 23:39:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419282 - head/news/newspost/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 23:39:35 -0000 Author: bapt Date: Fri Jul 29 23:39:33 2016 New Revision: 419282 URL: https://svnweb.freebsd.org/changeset/ports/419282 Log: Prevent collision with getline(3) Added: head/news/newspost/files/patch-base_newspost.c (contents, props changed) head/news/newspost/files/patch-base_utils.c (contents, props changed) head/news/newspost/files/patch-base_utils.h (contents, props changed) head/news/newspost/files/patch-ui_options.c (contents, props changed) Added: head/news/newspost/files/patch-base_newspost.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-base_newspost.c Fri Jul 29 23:39:33 2016 (r419282) @@ -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; Added: head/news/newspost/files/patch-base_utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-base_utils.c Fri Jul 29 23:39:33 2016 (r419282) @@ -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){ Added: head/news/newspost/files/patch-base_utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-base_utils.h Fri Jul 29 23:39:33 2016 (r419282) @@ -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, ... ); Added: head/news/newspost/files/patch-ui_options.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-ui_options.c Fri Jul 29 23:39:33 2016 (r419282) @@ -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) {