Module Name:    src
Committed By:   yamt
Date:           Thu May 22 15:44:54 UTC 2014

Modified Files:
        src/external/bsd/fetch/dist/libfetch [yamt-pagecache]: common.h fetch.3
            ftp.c http.c

Log Message:
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.6.1 \
    src/external/bsd/fetch/dist/libfetch/common.h
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.6.1 \
    src/external/bsd/fetch/dist/libfetch/fetch.3
cvs rdiff -u -r1.5 -r1.5.2.1 src/external/bsd/fetch/dist/libfetch/ftp.c
cvs rdiff -u -r1.2 -r1.2.2.1 src/external/bsd/fetch/dist/libfetch/http.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/fetch/dist/libfetch/common.h
diff -u src/external/bsd/fetch/dist/libfetch/common.h:1.1.1.7 src/external/bsd/fetch/dist/libfetch/common.h:1.1.1.7.6.1
--- src/external/bsd/fetch/dist/libfetch/common.h:1.1.1.7	Wed Mar 24 20:51:42 2010
+++ src/external/bsd/fetch/dist/libfetch/common.h	Thu May 22 15:44:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.h,v 1.1.1.7 2010/03/24 20:51:42 joerg Exp $	*/
+/*	$NetBSD: common.h,v 1.1.1.7.6.1 2014/05/22 15:44:54 yamt Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * All rights reserved.
@@ -90,7 +90,7 @@ struct fetcherr {
 
 void		 fetch_seterr(struct fetcherr *, int);
 void		 fetch_syserr(void);
-void		 fetch_info(const char *, ...);
+void		 fetch_info(const char *, ...) __printflike(1, 2);
 int		 fetch_default_port(const char *);
 int		 fetch_default_proxy_port(const char *);
 int		 fetch_bind(int, int, const char *);

Index: src/external/bsd/fetch/dist/libfetch/fetch.3
diff -u src/external/bsd/fetch/dist/libfetch/fetch.3:1.1.1.8 src/external/bsd/fetch/dist/libfetch/fetch.3:1.1.1.8.6.1
--- src/external/bsd/fetch/dist/libfetch/fetch.3:1.1.1.8	Sat Jan 30 21:26:10 2010
+++ src/external/bsd/fetch/dist/libfetch/fetch.3	Thu May 22 15:44:54 2014
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: fetch.3,v 1.64 2007/12/18 11:03:26 des Exp $
-.\" $NetBSD: fetch.3,v 1.1.1.8 2010/01/30 21:26:10 joerg Exp $
+.\" $NetBSD: fetch.3,v 1.1.1.8.6.1 2014/05/22 15:44:54 yamt Exp $
 .\"
 .Dd January 22, 2010
 .Dt FETCH 3
@@ -731,22 +731,22 @@ library first appeared in
 The
 .Nm fetch
 library was mostly written by
-.An Dag-Erling Sm\(/orgrav Aq d...@freebsd.org
+.An Dag-Erling Sm\(/orgrav Aq Mt d...@freebsd.org
 with numerous suggestions from
-.An Jordan K. Hubbard Aq j...@freebsd.org ,
-.An Eugene Skepner Aq e...@qub.com
+.An Jordan K. Hubbard Aq Mt j...@freebsd.org ,
+.An Eugene Skepner Aq Mt e...@qub.com
 and other
 .Fx
 developers.
 It replaces the older
 .Nm ftpio
 library written by
-.An Poul-Henning Kamp Aq p...@freebsd.org
+.An Poul-Henning Kamp Aq Mt p...@freebsd.org
 and
-.An Jordan K. Hubbard Aq j...@freebsd.org .
+.An Jordan K. Hubbard Aq Mt j...@freebsd.org .
 .Pp
 This manual page was written by
-.An Dag-Erling Sm\(/orgrav Aq d...@freebsd.org .
+.An Dag-Erling Sm\(/orgrav Aq Mt d...@freebsd.org .
 .Sh BUGS
 Some parts of the library are not yet implemented.
 The most notable

Index: src/external/bsd/fetch/dist/libfetch/ftp.c
diff -u src/external/bsd/fetch/dist/libfetch/ftp.c:1.5 src/external/bsd/fetch/dist/libfetch/ftp.c:1.5.2.1
--- src/external/bsd/fetch/dist/libfetch/ftp.c:1.5	Wed Aug 17 09:19:38 2011
+++ src/external/bsd/fetch/dist/libfetch/ftp.c	Thu May 22 15:44:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftp.c,v 1.5 2011/08/17 09:19:38 christos Exp $	*/
+/*	$NetBSD: ftp.c,v 1.5.2.1 2014/05/22 15:44:54 yamt Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 2008, 2009, 2010 Joerg Sonnenberger <jo...@netbsd.org>
@@ -138,6 +138,7 @@ static void
 unmappedaddr(struct sockaddr_in6 *sin6, socklen_t *len)
 {
 	struct sockaddr_in *sin4;
+	void *addrp;
 	uint32_t addr;
 	int port;
 
@@ -145,7 +146,8 @@ unmappedaddr(struct sockaddr_in6 *sin6, 
 	    !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
 		return;
 	sin4 = (struct sockaddr_in *)(void *)sin6;
-	addr = *(uint32_t *)(void *)&sin6->sin6_addr.s6_addr[12];
+	addrp = &sin6->sin6_addr.s6_addr[12];
+	addr = *(uint32_t *)addrp;
 	port = sin6->sin6_port;
 	memset(sin4, 0, sizeof(struct sockaddr_in));
 	sin4->sin_addr.s_addr = addr;
@@ -196,6 +198,7 @@ ftp_chkerr(conn_t *conn)
 /*
  * Send a command and check reply
  */
+__printflike(2, 3)
 static int
 ftp_cmd(conn_t *conn, const char *fmt, ...)
 {
@@ -389,7 +392,7 @@ ftp_cwd(conn_t *conn, const char *path, 
 			++beg, ++i;
 		for (++i; dst + i < end && dst[i] != '/'; ++i)
 			/* nothing */ ;
-		e = ftp_cmd(conn, "CWD %.*s\r\n", dst + i - beg, beg);
+		e = ftp_cmd(conn, "CWD %.*s\r\n", (int)(dst + i - beg), beg);
 		if (e != FTP_FILE_ACTION_OK) {
 			free(dst);
 			ftp_seterr(e);
@@ -487,7 +490,7 @@ ftp_stat(conn_t *conn, const char *file,
 		return (-1);
 	}
 
-	e = ftp_cmd(conn, "SIZE %.*s\r\n", filenamelen, filename);
+	e = ftp_cmd(conn, "SIZE %.*s\r\n", (int)filenamelen, filename);
 	if (e != FTP_FILE_STATUS) {
 		ftp_seterr(e);
 		return (-1);
@@ -504,7 +507,7 @@ ftp_stat(conn_t *conn, const char *file,
 	if (us->size == 0)
 		us->size = -1;
 
-	e = ftp_cmd(conn, "MDTM %.*s\r\n", filenamelen, filename);
+	e = ftp_cmd(conn, "MDTM %.*s\r\n", (int)filenamelen, filename);
 	if (e != FTP_FILE_STATUS) {
 		ftp_seterr(e);
 		return (-1);
@@ -849,7 +852,7 @@ retry_mode:
 			e = ftp_cmd(conn, "%s%s%s\r\n", oper, *op_arg ? " " : "", op_arg);
 		else
 			e = ftp_cmd(conn, "%s %.*s\r\n", oper,
-			    filenamelen, filename);
+			    (int)filenamelen, filename);
 		if (e != FTP_CONNECTION_ALREADY_OPEN && e != FTP_OPEN_DATA_CONNECTION)
 			goto ouch;
 
@@ -946,7 +949,7 @@ retry_mode:
 			e = ftp_cmd(conn, "%s%s%s\r\n", oper, *op_arg ? " " : "", op_arg);
 		else
 			e = ftp_cmd(conn, "%s %.*s\r\n", oper,
-			    filenamelen, filename);
+			    (int)filenamelen, filename);
 		if (e != FTP_CONNECTION_ALREADY_OPEN && e != FTP_OPEN_DATA_CONNECTION)
 			goto ouch;
 

Index: src/external/bsd/fetch/dist/libfetch/http.c
diff -u src/external/bsd/fetch/dist/libfetch/http.c:1.2 src/external/bsd/fetch/dist/libfetch/http.c:1.2.2.1
--- src/external/bsd/fetch/dist/libfetch/http.c:1.2	Sat Jun 25 20:27:01 2011
+++ src/external/bsd/fetch/dist/libfetch/http.c	Thu May 22 15:44:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: http.c,v 1.2 2011/06/25 20:27:01 christos Exp $	*/
+/*	$NetBSD: http.c,v 1.2.2.1 2014/05/22 15:44:54 yamt Exp $	*/
 /*-
  * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 2003 Thomas Klausner <w...@netbsd.org>
@@ -404,6 +404,7 @@ static struct {
 /*
  * Send a formatted line; optionally echo to terminal
  */
+__printflike(2, 3)
 static int
 http_cmd(conn_t *conn, const char *fmt, ...)
 {

Reply via email to