Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jul 2016 15:03:42 +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: r419387 - head/security/pgp/files
Message-ID:  <201607311503.u6VF3gkd012040@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Jul 31 15:03:42 2016
New Revision: 419387
URL: https://svnweb.freebsd.org/changeset/ports/419387

Log:
  Fix build with getline(3) in libc

Added:
  head/security/pgp/files/patch-armor.c   (contents, props changed)

Added: head/security/pgp/files/patch-armor.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/pgp/files/patch-armor.c	Sun Jul 31 15:03:42 2016	(r419387)
@@ -0,0 +1,29 @@
+--- armor.c.orig	1996-01-17 19:37:20 UTC
++++ armor.c
+@@ -343,7 +343,7 @@ copyline(FILE * in, FILE * out)
+  * idea.
+  */
+ static int
+-getline(char *buf, int n, FILE * f)
++get_line(char *buf, int n, FILE * f)
+ {
+     int state;
+     char *p;
+@@ -547,7 +547,7 @@ armor_file(char *infilename, char *outfi
+ 	    return 1;
+ 	}
+ 	fprintf(outFile, "-----BEGIN PGP SIGNED MESSAGE-----\n\n");
+-	while ((i = getline(buffer, sizeof buffer, clearFile)) >= 0) {
++	while ((i = get_line(buffer, sizeof buffer, clearFile)) >= 0) {
+ 	    /* Quote lines beginning with '-' as per RFC1113;
+ 	     * Also quote lines beginning with "From "; this is
+ 	     * for Unix mailers which add ">" to such lines.
+@@ -1231,7 +1231,7 @@ LANG("\n\007Unable to write ciphertext o
+ 	for (;;) {
+ 	    ++infile_line;
+ 	    nline = status;
+-	    status = getline(buf, sizeof buf, in);
++	    status = get_line(buf, sizeof buf, in);
+ 	    if (status < 0) {
+ 		fprintf(pgpout,
+ LANG("ERROR: ASCII armor decode input ended unexpectedly!\n"));



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