svn commit: r299342 - head/cddl/compat/opensolaris/misc

Baptiste Daroussin bapt at FreeBSD.org
Tue May 10 07:50:59 UTC 2016


Author: bapt
Date: Tue May 10 07:50:57 2016
New Revision: 299342
URL: https://svnweb.freebsd.org/changeset/base/299342

Log:
  rename getline into zgetline to avoid collision with getline(3)
  
  When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
  This rename is made in preparation for the removal of this guard
  
  Obtained from:	NetBSD

Modified:
  head/cddl/compat/opensolaris/misc/fsshare.c

Modified: head/cddl/compat/opensolaris/misc/fsshare.c
==============================================================================
--- head/cddl/compat/opensolaris/misc/fsshare.c	Tue May 10 07:45:44 2016	(r299341)
+++ head/cddl/compat/opensolaris/misc/fsshare.c	Tue May 10 07:50:57 2016	(r299342)
@@ -69,7 +69,7 @@ restart_mountd(void)
  * mountpoint specified in the 'skip' argument.
  */
 static char *
-getline(FILE *fd, const char *skip)
+zgetline(FILE *fd, const char *skip)
 {
 	static char line[MAXLINESIZE];
 	size_t len, skiplen;
@@ -200,7 +200,7 @@ fsshare_main(const char *file, const cha
 
 	/* Place big, fat warning at the begining of the file. */
 	fprintf(newfd, "%s", FILE_HEADER);
-	while (oldfd != NULL && (line = getline(oldfd, mountpoint)) != NULL)
+	while (oldfd != NULL && (line = zgetline(oldfd, mountpoint)) != NULL)
 		fprintf(newfd, "%s\n", line);
 	if (oldfd != NULL && ferror(oldfd) != 0) {
 		error = ferror(oldfd);


More information about the svn-src-head mailing list