Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2016 00:49:17 +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: r419292 - head/www/caudium14/files
Message-ID:  <201607300049.u6U0nH94053086@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sat Jul 30 00:49:17 2016
New Revision: 419292
URL: https://svnweb.freebsd.org/changeset/ports/419292

Log:
  Prevent collision with getline(3)

Added:
  head/www/caudium14/files/patch-src_tools_htpasswd.c   (contents, props changed)
  head/www/caudium14/files/patch-src_tools_htpasswd.h   (contents, props changed)

Added: head/www/caudium14/files/patch-src_tools_htpasswd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/caudium14/files/patch-src_tools_htpasswd.c	Sat Jul 30 00:49:17 2016	(r419292)
@@ -0,0 +1,20 @@
+--- src/tools/htpasswd.c.orig	2011-09-15 05:13:13 UTC
++++ src/tools/htpasswd.c
+@@ -53,7 +53,7 @@ void getword(char *word, char *line, cha
+     ;
+ }
+ 
+-int getline(char *s, int n, FILE *f) {
++int get_line(char *s, int n, FILE *f) {
+   register int i=0;
+ 
+   while(1) {
+@@ -165,7 +165,7 @@ int main(int argc, char *argv[]) {
+   strcpy(user,argv[2]);
+ 
+   found = 0;
+-  while(!(getline(line,MAX_STRING_LEN,f))) {
++  while(!(get_line(line,MAX_STRING_LEN,f))) {
+     if(found || (line[0] == '#') || (!line[0])) {
+       putline(tfp,line);
+       continue;

Added: head/www/caudium14/files/patch-src_tools_htpasswd.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/caudium14/files/patch-src_tools_htpasswd.h	Sat Jul 30 00:49:17 2016	(r419292)
@@ -0,0 +1,11 @@
+--- src/tools/htpasswd.h.orig	2011-09-15 05:13:13 UTC
++++ src/tools/htpasswd.h
+@@ -2,7 +2,7 @@
+ #define HTPASSWD_H
+ char *strd(char *s);
+ void getword(char *word, char *line, char stop);
+-int getline(char *s, int n, FILE *f);
++int get_line(char *s, int n, FILE *f);
+ void putline(FILE *f,char *l);
+ void to64(register char *s, register long v, register int n);
+ void add_password(char *user, FILE *f);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607300049.u6U0nH94053086>