libfetch: synchronized with NetBSD's pkgsrc/libfetch, preserving our changes.

This commit is contained in:
Juan RP
2014-06-29 10:29:36 +02:00
parent be1ef74ba2
commit 510c84d3bb
7 changed files with 72 additions and 47 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: common.h,v 1.16 2010/03/21 16:48:43 joerg Exp $ */
/* $NetBSD: common.h,v 1.23 2014/01/08 20:25:34 joerg Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Co<43>dan Sm<53>rgrav
* All rights reserved.
@ -45,9 +45,16 @@
#include <openssl/err.h>
#endif
#if defined(__GNUC__) && __GNUC__ >= 3
#define LIBFETCH_PRINTFLIKE(fmtarg, firstvararg) \
__attribute__((__format__ (__printf__, fmtarg, firstvararg)))
#else
#define LIBFETCH_PRINTFLIKE(fmtarg, firstvararg)
#endif
#if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
!defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \
!defined(__sgi)
!defined(__sgi) && !defined(__minix) && !defined(__CYGWIN__)
#define HAVE_SA_LEN
#endif
@ -90,7 +97,7 @@ struct fetcherr {
void fetch_seterr(struct fetcherr *, int);
void fetch_syserr(void);
void fetch_info(const char *, ...);
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 *);