From owner-svn-ports-all@freebsd.org Wed May 11 20:32:45 2016 Return-Path: Delivered-To: svn-ports-all@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 7D4E2B3772A; Wed, 11 May 2016 20:32:45 +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 33BCF1A9F; Wed, 11 May 2016 20:32:45 +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 u4BKWi5L005887; Wed, 11 May 2016 20:32:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4BKWiiD005885; Wed, 11 May 2016 20:32:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201605112032.u4BKWiiD005885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 May 2016 20:32:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415029 - head/misc/bogosort/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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 20:32:45 -0000 Author: bapt Date: Wed May 11 20:32:44 2016 New Revision: 415029 URL: https://svnweb.freebsd.org/changeset/ports/415029 Log: Prevent collision with getline(3) Added: head/misc/bogosort/files/patch-getlines.c (contents, props changed) head/misc/bogosort/files/patch-getlines.h (contents, props changed) Added: head/misc/bogosort/files/patch-getlines.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/bogosort/files/patch-getlines.c Wed May 11 20:32:44 2016 (r415029) @@ -0,0 +1,29 @@ +--- getlines.c.orig 2002-05-04 20:22:22 UTC ++++ getlines.c +@@ -49,7 +49,7 @@ getlines(FILE *stream) + char **ss = NULL; + + /* read all lines available */ +- while ((s = getline(stream)) != NULL) { ++ while ((s = get_line(stream)) != NULL) { + if (numlines == allocated) /* make more room if needed */ + ss = (char **)xrealloc(ss, + (allocated += LINESTEP) * sizeof (char *)); +@@ -81,7 +81,7 @@ getmorelines(FILE *stream, char **lines) + allocated = numlines + 1; /* this is a lie, but it's close enough */ + + /* read all lines available */ +- while ((s = getline(stream)) != NULL) { ++ while ((s = get_line(stream)) != NULL) { + if (numlines == allocated) /* make more room if needed */ + ss = (char **)xrealloc(ss, + (allocated += LINESTEP) * sizeof (char *)); +@@ -100,7 +100,7 @@ getmorelines(FILE *stream, char **lines) + * line in stream, return NULL on EOF + */ + char * +-getline(FILE *stream) ++get_line(FILE *stream) + { + int c, numchars = 0, allocated = 0; + char *s = NULL; Added: head/misc/bogosort/files/patch-getlines.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/bogosort/files/patch-getlines.h Wed May 11 20:32:44 2016 (r415029) @@ -0,0 +1,10 @@ +--- getlines.h.orig 2016-05-11 20:30:38 UTC ++++ getlines.h +@@ -39,6 +39,6 @@ char **getmorelines(FILE *stream, char * + * getline: return a pointer to a newly allocated string containing the next + * line in stream + */ +-char *getline(FILE *stream); ++char *get_line(FILE *stream); + + #endif /* GETLINES_H */