summaryrefslogtreecommitdiff
path: root/net/libfetch
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-04-07 15:27:21 +0000
committerjoerg <joerg@pkgsrc.org>2012-04-07 15:27:21 +0000
commit5a11d53b1951548ecf73e15a1781ee9abfbf8786 (patch)
treead0ab5a4fa2b84a94aa72131602eae0135bc5dc7 /net/libfetch
parent691186619011680bd287c7e25542a1f37dc03b66 (diff)
downloadpkgsrc-5a11d53b1951548ecf73e15a1781ee9abfbf8786.tar.gz
Fix the last commit to not break bootstrap.
Diffstat (limited to 'net/libfetch')
-rw-r--r--net/libfetch/files/common.h9
-rw-r--r--net/libfetch/files/ftp.c4
-rw-r--r--net/libfetch/files/http.c4
3 files changed, 11 insertions, 6 deletions
diff --git a/net/libfetch/files/common.h b/net/libfetch/files/common.h
index de2964a661d..0b9368973d7 100644
--- a/net/libfetch/files/common.h
+++ b/net/libfetch/files/common.h
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.18 2012/04/07 15:09:23 wiz Exp $ */
+/* $NetBSD: common.h,v 1.19 2012/04/07 15:27:21 joerg Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* All rights reserved.
@@ -45,6 +45,11 @@
#include <openssl/err.h>
#endif
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define LIBFETCH_PRINTFLIKE(fmtarg, firstvararg) \
+ __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
+#endif
+
#if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
!defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \
!defined(__sgi) && !defined(__minix)
@@ -90,7 +95,7 @@ struct fetcherr {
void fetch_seterr(struct fetcherr *, int);
void fetch_syserr(void);
-void fetch_info(const char *, ...) __printflike(1, 2);
+void fetch_info(const char *, ...) LIBFETCH_PRINTFLIKE(1, 2);
int fetch_default_port(const char *);
int fetch_default_proxy_port(const char *);
int fetch_bind(int, int, const char *);
diff --git a/net/libfetch/files/ftp.c b/net/libfetch/files/ftp.c
index d9e41241ec4..b849d4e0a5e 100644
--- a/net/libfetch/files/ftp.c
+++ b/net/libfetch/files/ftp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.41 2012/04/07 15:09:23 wiz Exp $ */
+/* $NetBSD: ftp.c,v 1.42 2012/04/07 15:27:21 joerg Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2008, 2009, 2010 Joerg Sonnenberger <joerg@NetBSD.org>
@@ -98,7 +98,7 @@
#include "common.h"
#include "ftperr.h"
-static int ftp_cmd(conn_t *, const char *, ...) __printflike(2, 3);
+static int ftp_cmd(conn_t *, const char *, ...) LIBFETCH_PRINTFLIKE(2, 3);
#define FTP_ANONYMOUS_USER "anonymous"
#define FTP_CONNECTION_ALREADY_OPEN 125
diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c
index 882fc4108aa..a37efb53f75 100644
--- a/net/libfetch/files/http.c
+++ b/net/libfetch/files/http.c
@@ -1,4 +1,4 @@
-/* $NetBSD: http.c,v 1.31 2012/04/07 15:09:23 wiz Exp $ */
+/* $NetBSD: http.c,v 1.32 2012/04/07 15:27:21 joerg Exp $ */
/*-
* Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org>
@@ -133,7 +133,7 @@
#define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599)
-static int http_cmd(conn_t *, const char *, ...) __printflike(2, 3);
+static int http_cmd(conn_t *, const char *, ...) LIBFETCH_PRINTFLIKE(2, 3);
/*****************************************************************************
* I/O functions for decoding chunked streams