[master] 2061f88 Our various "make-C-readable" macros encroach on name-spaces reserved by various standardsbodies.
Poul-Henning Kamp
phk at FreeBSD.org
Thu Nov 30 10:23:09 UTC 2017
commit 2061f887203ec454719fe760419f4562ca8876e6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Nov 30 10:17:33 2017 +0000
Our various "make-C-readable" macros encroach on name-spaces reserved
by various standardsbodies.
Going forward these macros will all be named 'v_[a-z_]*_' and only
vdef.h gets to define them.
Renames:
__match_proto__() -> v_matchproto_()
__v_printflike() -> v_printflike_()
__state_variable__() -> v_statevariable_()
__unused -> v_unused_
__attribute__((__noreturn__)) -> v_noreturn_
As a side-effect of the last one, the rule that "vdef.h" be the
first non-<...> include in .c files, possibly via a subsystem
.h (such as vct.h) needs to be enforced harder.
(autocraps "config.h" still needs to go before <...> includes)
diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 6d76761..f09f2d5 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -58,10 +58,11 @@
#include <string.h>
#include <unistd.h>
+#include "vdef.h"
+
#include "vapi/vsm.h"
#include "vas.h"
#include "vcli.h"
-#include "vdef.h"
#include "vnum.h"
#include "vtcp.h"
@@ -184,7 +185,7 @@ do_args(int sock, int argc, char * const *argv)
* to have a global variable.
*/
static int _line_sock;
-static void __match_proto__()
+static void v_matchproto_()
send_line(char *l)
{
if (l) {
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 4b27caf..189e5ef 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -672,7 +672,7 @@ void HTTP_Encode(const struct http *fm, uint8_t *, unsigned len, unsigned how);
int HTTP_Decode(struct http *to, const uint8_t *fm);
void http_ForceHeader(struct http *to, const char *hdr, const char *val);
void http_PrintfHeader(struct http *to, const char *fmt, ...)
- __v_printflike(2, 3);
+ v_printflike_(2, 3);
void http_TimeHeader(struct http *to, const char *fmt, double now);
void http_Proto(struct http *to);
void http_SetHeader(struct http *to, const char *hdr);
@@ -860,10 +860,10 @@ const char *SES_Get_String_Attr(const struct sess *sp, enum sess_attr a);
/* cache_shmlog.c */
void VSLv(enum VSL_tag_e tag, uint32_t vxid, const char *fmt, va_list va);
void VSL(enum VSL_tag_e tag, uint32_t vxid, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void VSLbv(struct vsl_log *, enum VSL_tag_e tag, const char *fmt, va_list va);
void VSLb(struct vsl_log *, enum VSL_tag_e tag, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void VSLbt(struct vsl_log *, enum VSL_tag_e tag, txt t);
void VSLb_ts(struct vsl_log *, const char *event, double first, double *pprev,
double now);
@@ -927,7 +927,7 @@ void *WS_Alloc(struct ws *ws, unsigned bytes);
void *WS_Copy(struct ws *ws, const void *str, int len);
uintptr_t WS_Snapshot(struct ws *ws);
int WS_Overflowed(const struct ws *ws);
-void *WS_Printf(struct ws *ws, const char *fmt, ...) __v_printflike(2, 3);
+void *WS_Printf(struct ws *ws, const char *fmt, ...) v_printflike_(2, 3);
int WS_Inside(const struct ws *, const void *, const void *);
void WS_Assert_Allocated(const struct ws *ws, const void *ptr, ssize_t len);
diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index 21b8b0a..18f02ca 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -289,7 +289,7 @@ vca_pace_good(void)
* Called from assigned worker thread
*/
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
vca_make_session(struct worker *wrk, void *arg)
{
struct sess *sp;
@@ -391,7 +391,7 @@ vca_make_session(struct worker *wrk, void *arg)
* and handle the new connection ourselves.
*/
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
vca_accept_task(struct worker *wrk, void *arg)
{
struct wrk_accept wa;
@@ -518,7 +518,7 @@ VCA_DestroyPool(struct pool *pp)
/*--------------------------------------------------------------------*/
-static void * __match_proto__()
+static void * v_matchproto_()
vca_acct(void *arg)
{
struct listen_sock *ls;
@@ -583,7 +583,7 @@ vca_acct(void *arg)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
ccf_start(struct cli *cli, const char * const *av, void *priv)
{
@@ -596,7 +596,7 @@ ccf_start(struct cli *cli, const char * const *av, void *priv)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
ccf_listen_address(struct cli *cli, const char * const *av, void *priv)
{
struct listen_sock *ls;
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index d05cb80..d1e5525 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -150,7 +150,7 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo,
return (vtp);
}
-static unsigned __match_proto__(vdi_healthy_f)
+static unsigned v_matchproto_(vdi_healthy_f)
vbe_dir_healthy(const struct director *d, const struct busyobj *bo,
double *changed)
{
@@ -162,7 +162,7 @@ vbe_dir_healthy(const struct director *d, const struct busyobj *bo,
return (VDI_Healthy(be->director, changed));
}
-static void __match_proto__(vdi_finish_f)
+static void v_matchproto_(vdi_finish_f)
vbe_dir_finish(const struct director *d, struct worker *wrk,
struct busyobj *bo)
{
@@ -203,7 +203,7 @@ vbe_dir_finish(const struct director *d, struct worker *wrk,
bo->htc = NULL;
}
-static int __match_proto__(vdi_gethdrs_f)
+static int v_matchproto_(vdi_gethdrs_f)
vbe_dir_gethdrs(const struct director *d, struct worker *wrk,
struct busyobj *bo)
{
@@ -272,7 +272,7 @@ vbe_dir_gethdrs(const struct director *d, struct worker *wrk,
return (-1);
}
-static const struct suckaddr * __match_proto__(vdi_getip_f)
+static const struct suckaddr * v_matchproto_(vdi_getip_f)
vbe_dir_getip(const struct director *d, struct worker *wrk,
struct busyobj *bo)
{
@@ -365,7 +365,7 @@ vbe_dir_event(const struct director *d, enum vcl_event_e ev)
/*---------------------------------------------------------------------*/
-static void __match_proto__(vdi_destroy_f)
+static void v_matchproto_(vdi_destroy_f)
vbe_destroy(const struct director *d)
{
struct backend *be;
diff --git a/bin/varnishd/cache/cache_backend_probe.c b/bin/varnishd/cache/cache_backend_probe.c
index 26e14b1..b362cec 100644
--- a/bin/varnishd/cache/cache_backend_probe.c
+++ b/bin/varnishd/cache/cache_backend_probe.c
@@ -380,7 +380,7 @@ vbp_poke(struct vbp_target *vt)
/*--------------------------------------------------------------------
*/
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
vbp_task(struct worker *wrk, void *priv)
{
struct vbp_target *vt;
@@ -415,7 +415,7 @@ vbp_task(struct worker *wrk, void *priv)
/*--------------------------------------------------------------------
*/
-static void * __match_proto__()
+static void * v_matchproto_()
vbp_thread(struct worker *wrk, void *priv)
{
double now, nxt;
@@ -653,7 +653,7 @@ VBP_Remove(struct backend *be)
/*-------------------------------------------------------------------*/
-static int __match_proto__(binheap_cmp_t)
+static int v_matchproto_(binheap_cmp_t)
vbp_cmp(void *priv, const void *a, const void *b)
{
const struct vbp_target *aa, *bb;
@@ -668,7 +668,7 @@ vbp_cmp(void *priv, const void *a, const void *b)
return (aa->due < bb->due);
}
-static void __match_proto__(binheap_update_t)
+static void v_matchproto_(binheap_update_t)
vbp_update(void *priv, void *p, unsigned u)
{
struct vbp_target *vt;
diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index e2b16ee..0393dee 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -618,7 +618,7 @@ BAN_CheckObject(struct worker *wrk, struct objcore *oc, struct req *req)
* CLI functions to add bans
*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
ccf_ban(struct cli *cli, const char * const *av, void *priv)
{
int narg, i;
@@ -707,7 +707,7 @@ ban_render(struct cli *cli, const uint8_t *bs)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
ccf_ban_list(struct cli *cli, const char * const *av, void *priv)
{
struct ban *b, *bl;
diff --git a/bin/varnishd/cache/cache_ban_lurker.c b/bin/varnishd/cache/cache_ban_lurker.c
index ba3447e..974cf9c 100644
--- a/bin/varnishd/cache/cache_ban_lurker.c
+++ b/bin/varnishd/cache/cache_ban_lurker.c
@@ -364,7 +364,7 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl)
return (dt);
}
-void * __match_proto__(bgthread_t)
+void * v_matchproto_(bgthread_t)
ban_lurker(struct worker *wrk, void *priv)
{
struct vsl_log vsl;
diff --git a/bin/varnishd/cache/cache_deliver_proc.c b/bin/varnishd/cache/cache_deliver_proc.c
index 2221c89..20439b1 100644
--- a/bin/varnishd/cache/cache_deliver_proc.c
+++ b/bin/varnishd/cache/cache_deliver_proc.c
@@ -123,7 +123,7 @@ VDP_close(struct req *req)
/*--------------------------------------------------------------------*/
-static int __match_proto__(objiterate_f)
+static int v_matchproto_(objiterate_f)
vdp_objiterator(void *priv, int flush, const void *ptr, ssize_t len)
{
return (VDP_bytes(priv, flush ? VDP_FLUSH : VDP_NULL, ptr, len));
diff --git a/bin/varnishd/cache/cache_director.c b/bin/varnishd/cache/cache_director.c
index f47ac1a..30ae727 100644
--- a/bin/varnishd/cache/cache_director.c
+++ b/bin/varnishd/cache/cache_director.c
@@ -283,7 +283,7 @@ VDI_Healthy(const struct director *d, double *changed)
/*---------------------------------------------------------------------*/
-static int __match_proto__(vcl_be_func)
+static int v_matchproto_(vcl_be_func)
do_list(struct cli *cli, struct director *d, void *priv)
{
int *probes;
@@ -317,7 +317,7 @@ do_list(struct cli *cli, struct director *d, void *priv)
return (0);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
cli_backend_list(struct cli *cli, const char * const *av, void *priv)
{
int probes = 0;
@@ -343,7 +343,7 @@ cli_backend_list(struct cli *cli, const char * const *av, void *priv)
/*---------------------------------------------------------------------*/
-static int __match_proto__(vcl_be_func)
+static int v_matchproto_(vcl_be_func)
do_set_health(struct cli *cli, struct director *d, void *priv)
{
unsigned prev;
@@ -362,7 +362,7 @@ do_set_health(struct cli *cli, struct director *d, void *priv)
return (0);
}
-static void __match_proto__()
+static void v_matchproto_()
cli_backend_set_health(struct cli *cli, const char * const *av, void *priv)
{
const struct vdi_ahealth *ah;
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 0d3e451..3af6985 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -77,7 +77,7 @@ static const struct transport VED_transport = {
/*--------------------------------------------------------------------*/
-static void __match_proto__(vtr_reembark_f)
+static void v_matchproto_(vtr_reembark_f)
ved_reembark(struct worker *wrk, struct req *req)
{
struct ecx *ecx;
@@ -249,7 +249,7 @@ ved_decode_len(struct req *req, const uint8_t **pp)
/*---------------------------------------------------------------------
*/
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
ved_vdp(struct req *req, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
@@ -466,7 +466,7 @@ ved_bytes(struct req *req, struct req *preq, enum vdp_action act,
* the stream with a bit more overhead.
*/
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
ved_pretend_gzip(struct req *req, enum vdp_action act, void **priv,
const void *pv, ssize_t l)
{
@@ -767,7 +767,7 @@ ved_stripgzip(struct req *req, const struct boc *boc)
/*--------------------------------------------------------------------*/
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
ved_vdp_bytes(struct req *req, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
@@ -791,7 +791,7 @@ static const struct vdp ved_ved = {
/*--------------------------------------------------------------------*/
-static void __match_proto__(vtr_deliver_f)
+static void v_matchproto_(vtr_deliver_f)
ved_deliver(struct req *req, struct boc *boc, int wantbody)
{
int i;
diff --git a/bin/varnishd/cache/cache_esi_fetch.c b/bin/varnishd/cache/cache_esi_fetch.c
index 47ea1c8..906c2ba 100644
--- a/bin/varnishd/cache/cache_esi_fetch.c
+++ b/bin/varnishd/cache/cache_esi_fetch.c
@@ -145,7 +145,7 @@ vfp_esi_end(struct vfp_ctx *vc, struct vef_priv *vef,
return (retval);
}
-static enum vfp_status __match_proto__(vfp_init_f)
+static enum vfp_status v_matchproto_(vfp_init_f)
vfp_esi_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
{
struct vef_priv *vef;
@@ -176,7 +176,7 @@ vfp_esi_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
return (VFP_OK);
}
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
vfp_esi_gzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
ssize_t *lp)
{
@@ -219,7 +219,7 @@ vfp_esi_gzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
return (vp);
}
-static enum vfp_status __match_proto__(vfp_init_f)
+static enum vfp_status v_matchproto_(vfp_init_f)
vfp_esi_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
{
struct vef_priv *vef;
@@ -234,7 +234,7 @@ vfp_esi_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
return (VFP_OK);
}
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
vfp_esi_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p, ssize_t *lp)
{
enum vfp_status vp;
@@ -261,7 +261,7 @@ vfp_esi_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p, ssize_t *lp)
return (vp);
}
-static void __match_proto__(vfp_fini_f)
+static void v_matchproto_(vfp_fini_f)
vfp_esi_fini(struct vfp_ctx *vc, struct vfp_entry *vfe)
{
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
diff --git a/bin/varnishd/cache/cache_esi_parse.c b/bin/varnishd/cache/cache_esi_parse.c
index 0cef4dd..1fd6e53 100644
--- a/bin/varnishd/cache/cache_esi_parse.c
+++ b/bin/varnishd/cache/cache_esi_parse.c
@@ -395,7 +395,7 @@ vep_mark_pending(struct vep_state *vep, const char *p)
/*---------------------------------------------------------------------
*/
-static void __match_proto__()
+static void v_matchproto_()
vep_do_comment(struct vep_state *vep, enum dowhat what)
{
Debug("DO_COMMENT(%d)\n", what);
@@ -407,7 +407,7 @@ vep_do_comment(struct vep_state *vep, enum dowhat what)
/*---------------------------------------------------------------------
*/
-static void __match_proto__()
+static void v_matchproto_()
vep_do_remove(struct vep_state *vep, enum dowhat what)
{
Debug("DO_REMOVE(%d, end %d empty %d remove %d)\n",
@@ -426,7 +426,7 @@ vep_do_remove(struct vep_state *vep, enum dowhat what)
/*---------------------------------------------------------------------
*/
-static void __match_proto__()
+static void v_matchproto_()
vep_do_include(struct vep_state *vep, enum dowhat what)
{
const char *p, *q, *h;
@@ -1001,7 +1001,7 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
/*---------------------------------------------------------------------
*/
-static ssize_t __match_proto__(vep_callback_t)
+static ssize_t v_matchproto_(vep_callback_t)
vep_default_cb(struct vfp_ctx *vc, void *priv, ssize_t l, enum vgz_flag flg)
{
ssize_t *s;
diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 7bbd123..3b6f097 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -279,7 +279,7 @@ exp_expire(struct exp_priv *ep, double now)
* object expires, accounting also for graceability, it is killed.
*/
-static int __match_proto__(binheap_cmp_t)
+static int v_matchproto_(binheap_cmp_t)
object_cmp(void *priv, const void *a, const void *b)
{
const struct objcore *aa, *bb;
@@ -290,7 +290,7 @@ object_cmp(void *priv, const void *a, const void *b)
return (aa->timer_when < bb->timer_when);
}
-static void __match_proto__(binheap_update_t)
+static void v_matchproto_(binheap_update_t)
object_update(void *priv, void *p, unsigned u)
{
struct objcore *oc;
@@ -300,7 +300,7 @@ object_update(void *priv, void *p, unsigned u)
oc->timer_idx = u;
}
-static void * __match_proto__(bgthread_t)
+static void * v_matchproto_(bgthread_t)
exp_thread(struct worker *wrk, void *priv)
{
struct objcore *oc;
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index cf3389a..e08f6fb 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -869,7 +869,7 @@ vbf_stp_done(void)
NEEDLESS(return(F_STP_DONE));
}
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
vbf_fetch_thread(struct worker *wrk, void *priv)
{
struct busyobj *bo;
diff --git a/bin/varnishd/cache/cache_fetch_proc.c b/bin/varnishd/cache/cache_fetch_proc.c
index 84b3abb..1413f1b 100644
--- a/bin/varnishd/cache/cache_fetch_proc.c
+++ b/bin/varnishd/cache/cache_fetch_proc.c
@@ -224,7 +224,7 @@ VFP_Push(struct vfp_ctx *vc, const struct vfp *vfp)
* Debugging aids
*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
debug_fragfetch(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
diff --git a/bin/varnishd/cache/cache_filter.h b/bin/varnishd/cache/cache_filter.h
index f6a1ffa..4745836 100644
--- a/bin/varnishd/cache/cache_filter.h
+++ b/bin/varnishd/cache/cache_filter.h
@@ -86,7 +86,7 @@ struct vfp_ctx {
enum vfp_status VFP_Suck(struct vfp_ctx *, void *p, ssize_t *lp);
enum vfp_status VFP_Error(struct vfp_ctx *, const char *fmt, ...)
- __v_printflike(2, 3);
+ v_printflike_(2, 3);
/* Deliver processors ------------------------------------------------*/
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index 258db64..aee17d3 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -284,7 +284,7 @@ VGZ_Gzip(struct vgz *vg, const void **pptr, ssize_t *plen, enum vgz_flag flags)
* VDP for gunzip'ing
*/
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
vdp_gunzip(struct req *req, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
@@ -437,7 +437,7 @@ VGZ_Destroy(struct vgz **vgp)
/*--------------------------------------------------------------------*/
-static enum vfp_status __match_proto__(vfp_init_f)
+static enum vfp_status v_matchproto_(vfp_init_f)
vfp_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
{
struct vgz *vg;
@@ -486,7 +486,7 @@ vfp_gzip_init(struct vfp_ctx *vc, struct vfp_entry *vfe)
* A VFP for gunzip'ing an object as we receive it from the backend
*/
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
vfp_gunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
ssize_t *lp)
{
@@ -540,7 +540,7 @@ vfp_gunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
* A VFP for gzip'ing an object as we receive it from the backend
*/
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
vfp_gzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
ssize_t *lp)
{
@@ -596,7 +596,7 @@ vfp_gzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
* collecting the magic bits while we're at it.
*/
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
vfp_testgunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
ssize_t *lp)
{
@@ -638,7 +638,7 @@ vfp_testgunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
/*--------------------------------------------------------------------*/
-static void __match_proto__(vfp_fini_f)
+static void v_matchproto_(vfp_fini_f)
vfp_gzip_fini(struct vfp_ctx *vc, struct vfp_entry *vfe)
{
struct vgz *vg;
diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c
index d9bd7ff..ee3e864 100644
--- a/bin/varnishd/cache/cache_lck.c
+++ b/bin/varnishd/cache/cache_lck.c
@@ -104,7 +104,7 @@ Lck_Witness_Unlock(const struct ilck *il)
/*--------------------------------------------------------------------*/
-void __match_proto__()
+void v_matchproto_()
Lck__Lock(struct lock *lck, const char *p, int l)
{
struct ilck *ilck;
@@ -119,7 +119,7 @@ Lck__Lock(struct lock *lck, const char *p, int l)
ilck->held = 1;
}
-void __match_proto__()
+void v_matchproto_()
Lck__Unlock(struct lock *lck, const char *p, int l)
{
struct ilck *ilck;
@@ -147,7 +147,7 @@ Lck__Unlock(struct lock *lck, const char *p, int l)
Lck_Witness_Unlock(ilck);
}
-int __match_proto__()
+int v_matchproto_()
Lck__Trylock(struct lock *lck, const char *p, int l)
{
struct ilck *ilck;
@@ -186,7 +186,7 @@ Lck__Owned(const struct lock *lck)
return (pthread_equal(ilck->owner, pthread_self()));
}
-int __match_proto__()
+int v_matchproto_()
Lck_CondWait(pthread_cond_t *cond, struct lock *lck, double when)
{
struct ilck *ilck;
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index 799cda3..0f92414 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -180,7 +180,7 @@ VXID_Get(struct worker *wrk, uint32_t mask)
* Dumb down the VXID allocation to make it predictable for
* varnishtest cases
*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
cli_debug_xid(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
@@ -195,7 +195,7 @@ cli_debug_xid(struct cli *cli, const char * const *av, void *priv)
* Default to seed=1, this is the only seed value POSIXl guarantees will
* result in a reproducible random number sequence.
*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
cli_debug_srandom(struct cli *cli, const char * const *av, void *priv)
{
unsigned seed = 1;
@@ -231,7 +231,7 @@ child_malloc_fail(void *p, const char *s)
* signal handler for child process
*/
-static void __match_proto__()
+static void v_matchproto_()
child_signal_handler(int s, siginfo_t *si, void *c)
{
char buf[1024];
diff --git a/bin/varnishd/cache/cache_mempool.c b/bin/varnishd/cache/cache_mempool.c
index 6c150bd..9017532 100644
--- a/bin/varnishd/cache/cache_mempool.c
+++ b/bin/varnishd/cache/cache_mempool.c
@@ -98,7 +98,7 @@ mpl_guard(void *priv)
{
struct mempool *mpl;
struct memitem *mi = NULL;
- double __state_variable__(mpl_slp);
+ double v_statevariable_(mpl_slp);
double last = 0;
CAST_OBJ_NOTNULL(mpl, priv, MEMPOOL_MAGIC);
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 75faef9..b13ae48 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -665,7 +665,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
ccf_panic(struct cli *cli, const char * const *av, void *priv)
{
diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index 3e7a670..f2bcc23 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -118,7 +118,7 @@ Pool_PurgeStat(unsigned nobj)
* Special function to summ stats
*/
-void __match_proto__(task_func_t)
+void v_matchproto_(task_func_t)
pool_stat_summ(struct worker *wrk, void *priv)
{
struct VSC_main *src;
@@ -178,7 +178,7 @@ pool_mkpool(unsigned pool_no)
* NB: be maintained for params which require action.
*/
-static void * __match_proto__()
+static void * v_matchproto_()
pool_poolherder(void *priv)
{
unsigned nwq;
diff --git a/bin/varnishd/cache/cache_range.c b/bin/varnishd/cache/cache_range.c
index 7ee0b11..acd7034 100644
--- a/bin/varnishd/cache/cache_range.c
+++ b/bin/varnishd/cache/cache_range.c
@@ -44,7 +44,7 @@ struct vrg_priv {
ssize_t range_off;
};
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
vrg_range_bytes(struct req *req, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
diff --git a/bin/varnishd/cache/cache_req.c b/bin/varnishd/cache/cache_req.c
index 0688adf..25c4ce1 100644
--- a/bin/varnishd/cache/cache_req.c
+++ b/bin/varnishd/cache/cache_req.c
@@ -231,7 +231,7 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
/*----------------------------------------------------------------------
*/
-void __match_proto__(vtr_req_fail_f)
+void v_matchproto_(vtr_req_fail_f)
Req_Fail(struct req *req, enum sess_close reason)
{
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
diff --git a/bin/varnishd/cache/cache_req_body.c b/bin/varnishd/cache/cache_req_body.c
index b7de15a..d170bbc 100644
--- a/bin/varnishd/cache/cache_req_body.c
+++ b/bin/varnishd/cache/cache_req_body.c
@@ -225,7 +225,7 @@ VRB_Iterate(struct req *req, objiterate_f *func, void *priv)
* just iterate it into oblivion.
*/
-static int __match_proto__(objiterate_f)
+static int v_matchproto_(objiterate_f)
httpq_req_body_discard(void *priv, int flush, const void *ptr, ssize_t len)
{
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index 0ddd0f5..3e96b78 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -382,7 +382,7 @@ SES_Reschedule_Req(struct req *req, enum task_prio prio)
* Handle a session (from waiter)
*/
-static void __match_proto__(waiter_handle_f)
+static void v_matchproto_(waiter_handle_f)
ses_handle(struct waited *wp, enum wait_event ev, double now)
{
struct sess *sp;
diff --git a/bin/varnishd/cache/cache_tcp_pool.c b/bin/varnishd/cache/cache_tcp_pool.c
index 18adad3..feaeed1 100644
--- a/bin/varnishd/cache/cache_tcp_pool.c
+++ b/bin/varnishd/cache/cache_tcp_pool.c
@@ -72,7 +72,7 @@ static VTAILQ_HEAD(, tcp_pool) tcp_pools = VTAILQ_HEAD_INITIALIZER(tcp_pools);
* Waiter-handler
*/
-static void __match_proto__(waiter_handle_f)
+static void v_matchproto_(waiter_handle_f)
tcp_handle(struct waited *w, enum wait_event ev, double now)
{
struct vtp *vtp;
diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index 26043ea..d605dcf 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -899,7 +899,7 @@ VCL_Poll(void)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_list(struct cli *cli, const char * const *av, void *priv)
{
struct vcl *vcl;
@@ -932,7 +932,7 @@ vcl_cli_list(struct cli *cli, const char * const *av, void *priv)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_load(struct cli *cli, const char * const *av, void *priv)
{
struct vrt_ctx *ctx;
@@ -944,7 +944,7 @@ vcl_cli_load(struct cli *cli, const char * const *av, void *priv)
vcl_rel_ctx(&ctx);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_state(struct cli *cli, const char * const *av, void *priv)
{
struct vrt_ctx *ctx;
@@ -969,7 +969,7 @@ vcl_cli_state(struct cli *cli, const char * const *av, void *priv)
vcl_rel_ctx(&ctx);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_discard(struct cli *cli, const char * const *av, void *priv)
{
struct vcl *vcl;
@@ -1002,7 +1002,7 @@ vcl_cli_discard(struct cli *cli, const char * const *av, void *priv)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_label(struct cli *cli, const char * const *av, void *priv)
{
struct vcl *lbl;
@@ -1029,7 +1029,7 @@ vcl_cli_label(struct cli *cli, const char * const *av, void *priv)
vcl->nlabels++;
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_use(struct cli *cli, const char * const *av, void *priv)
{
struct vcl *vcl;
@@ -1045,7 +1045,7 @@ vcl_cli_use(struct cli *cli, const char * const *av, void *priv)
Lck_Unlock(&vcl_mtx);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
vcl_cli_show(struct cli *cli, const char * const *av, void *priv)
{
struct vcl *vcl;
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index 0d3b19e..1a95db3 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -389,7 +389,7 @@ VRT_TIME_string(VRT_CTX, double t)
return (p);
}
-const char * __match_proto__()
+const char * v_matchproto_()
VRT_BACKEND_string(VCL_BACKEND d)
{
if (d == NULL)
diff --git a/bin/varnishd/cache/cache_vrt_vmod.c b/bin/varnishd/cache/cache_vrt_vmod.c
index f1c7a80..658e3ba 100644
--- a/bin/varnishd/cache/cache_vrt_vmod.c
+++ b/bin/varnishd/cache/cache_vrt_vmod.c
@@ -201,7 +201,7 @@ VMOD_Panic(struct vsb *vsb)
/*---------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
ccf_debug_vmod(struct cli *cli, const char * const *av, void *priv)
{
struct vmod *v;
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index af65011..2a9c75d 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -281,7 +281,7 @@ Pool_Task(struct pool *pp, struct pool_task *task, enum task_prio prio)
* Empty function used as a pointer value for the thread exit condition.
*/
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
pool_kiss_of_death(struct worker *wrk, void *priv)
{
(void)wrk;
diff --git a/bin/varnishd/hash/hash_classic.c b/bin/varnishd/hash/hash_classic.c
index c9e0d7f..33704e4 100644
--- a/bin/varnishd/hash/hash_classic.c
+++ b/bin/varnishd/hash/hash_classic.c
@@ -58,7 +58,7 @@ static struct hcl_hd *hcl_head;
* The ->init method allows the management process to pass arguments
*/
-static void __match_proto__(hash_init_f)
+static void v_matchproto_(hash_init_f)
hcl_init(int ac, char * const *av)
{
int i;
@@ -89,7 +89,7 @@ hcl_init(int ac, char * const *av)
* initialization to happen before the first lookup.
*/
-static void __match_proto__(hash_start_f)
+static void v_matchproto_(hash_start_f)
hcl_start(void)
{
unsigned u;
@@ -114,7 +114,7 @@ hcl_start(void)
* rare and collisions even rarer.
*/
-static struct objhead * __match_proto__(hash_lookup_f)
+static struct objhead * v_matchproto_(hash_lookup_f)
hcl_lookup(struct worker *wrk, const void *digest, struct objhead **noh)
{
struct objhead *oh;
@@ -171,7 +171,7 @@ hcl_lookup(struct worker *wrk, const void *digest, struct objhead **noh)
* Dereference and if no references are left, free.
*/
-static int __match_proto__(hash_deref_f)
+static int v_matchproto_(hash_deref_f)
hcl_deref(struct objhead *oh)
{
struct hcl_hd *hp;
diff --git a/bin/varnishd/hash/hash_critbit.c b/bin/varnishd/hash/hash_critbit.c
index 417673c..c673595 100644
--- a/bin/varnishd/hash/hash_critbit.c
+++ b/bin/varnishd/hash/hash_critbit.c
@@ -305,7 +305,7 @@ hcb_delete(struct hcb_root *r, const struct objhead *oh)
/*--------------------------------------------------------------------*/
-static void * __match_proto__(bgthread_t)
+static void * v_matchproto_(bgthread_t)
hcb_cleaner(struct worker *wrk, void *priv)
{
struct hcb_y *y, *y2;
@@ -333,7 +333,7 @@ hcb_cleaner(struct worker *wrk, void *priv)
/*--------------------------------------------------------------------*/
-static void __match_proto__(hash_start_f)
+static void v_matchproto_(hash_start_f)
hcb_start(void)
{
struct objhead *oh = NULL;
@@ -346,7 +346,7 @@ hcb_start(void)
hcb_build_bittbl();
}
-static int __match_proto__(hash_deref_f)
+static int v_matchproto_(hash_deref_f)
hcb_deref(struct objhead *oh)
{
@@ -367,7 +367,7 @@ hcb_deref(struct objhead *oh)
return (1);
}
-static struct objhead * __match_proto__(hash_lookup_f)
+static struct objhead * v_matchproto_(hash_lookup_f)
hcb_lookup(struct worker *wrk, const void *digest, struct objhead **noh)
{
struct objhead *oh;
@@ -431,7 +431,7 @@ hcb_lookup(struct worker *wrk, const void *digest, struct objhead **noh)
}
}
-static void __match_proto__(hash_prep_f)
+static void v_matchproto_(hash_prep_f)
hcb_prep(struct worker *wrk)
{
struct hcb_y *y;
diff --git a/bin/varnishd/hash/hash_simple_list.c b/bin/varnishd/hash/hash_simple_list.c
index 188c5ce..e2726ea 100644
--- a/bin/varnishd/hash/hash_simple_list.c
+++ b/bin/varnishd/hash/hash_simple_list.c
@@ -48,7 +48,7 @@ static struct lock hsl_mtx;
* initialization to happen before the first lookup.
*/
-static void __match_proto__(hash_start_f)
+static void v_matchproto_(hash_start_f)
hsl_start(void)
{
@@ -63,7 +63,7 @@ hsl_start(void)
* A reference to the returned object is held.
*/
-static struct objhead * __match_proto__(hash_lookup_f)
+static struct objhead * v_matchproto_(hash_lookup_f)
hsl_lookup(struct worker *wrk, const void *digest, struct objhead **noh)
{
struct objhead *oh;
@@ -107,7 +107,7 @@ hsl_lookup(struct worker *wrk, const void *digest, struct objhead **noh)
* Dereference and if no references are left, free.
*/
-static int __match_proto__(hash_deref_f)
+static int v_matchproto_(hash_deref_f)
hsl_deref(struct objhead *oh)
{
int ret;
diff --git a/bin/varnishd/hpack/vhp_decode.c b/bin/varnishd/hpack/vhp_decode.c
index 328d197..fa1e652 100644
--- a/bin/varnishd/hpack/vhp_decode.c
+++ b/bin/varnishd/hpack/vhp_decode.c
@@ -106,7 +106,7 @@ vhd_next_state(struct vhd_decode *d)
}
/* State functions */
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_skip(struct vhd_ctx *ctx, unsigned first)
{
AN(ctx);
@@ -115,7 +115,7 @@ vhd_skip(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_goto(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
@@ -129,7 +129,7 @@ vhd_goto(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_idle(struct vhd_ctx *ctx, unsigned first)
{
uint8_t c;
@@ -157,7 +157,7 @@ vhd_idle(struct vhd_ctx *ctx, unsigned first)
return (VHD_OK);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_integer(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
@@ -204,7 +204,7 @@ vhd_integer(struct vhd_ctx *ctx, unsigned first)
return (VHD_MORE);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_set_max(struct vhd_ctx *ctx, unsigned first)
{
AN(ctx);
@@ -218,7 +218,7 @@ vhd_set_max(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_set_idx(struct vhd_ctx *ctx, unsigned first)
{
AN(ctx);
@@ -229,7 +229,7 @@ vhd_set_idx(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_lookup(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
@@ -283,7 +283,7 @@ vhd_lookup(struct vhd_ctx *ctx, unsigned first)
return (VHD_BUF);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_new(struct vhd_ctx *ctx, unsigned first)
{
AN(ctx);
@@ -294,7 +294,7 @@ vhd_new(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_new_idx(struct vhd_ctx *ctx, unsigned first)
{
AN(ctx);
@@ -307,7 +307,7 @@ vhd_new_idx(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_branch_zidx(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
@@ -325,7 +325,7 @@ vhd_branch_zidx(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_branch_bit0(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
@@ -346,7 +346,7 @@ vhd_branch_bit0(struct vhd_ctx *ctx, unsigned first)
return (VHD_AGAIN);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_raw(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
@@ -398,7 +398,7 @@ vhd_raw(struct vhd_ctx *ctx, unsigned first)
return (s->arg1);
}
-static enum vhd_ret_e __match_proto__(vhd_state_f)
+static enum vhd_ret_e v_matchproto_(vhd_state_f)
vhd_huffman(struct vhd_ctx *ctx, unsigned first)
{
const struct vhd_state *s;
diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c
index 99f855d..f4bfb03 100644
--- a/bin/varnishd/http1/cache_http1_deliver.c
+++ b/bin/varnishd/http1/cache_http1_deliver.c
@@ -35,7 +35,7 @@
/*--------------------------------------------------------------------*/
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
v1d_bytes(struct req *req, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
@@ -83,7 +83,7 @@ v1d_error(struct req *req, const char *msg)
/*--------------------------------------------------------------------
*/
-void __match_proto__(vtr_deliver_f)
+void v_matchproto_(vtr_deliver_f)
V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
{
int err;
diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index 81acbda..07a2194 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -45,7 +45,7 @@
* Pass the request body to the backend
*/
-static int __match_proto__(objiterate_f)
+static int v_matchproto_(objiterate_f)
vbf_iter_req_body(void *priv, int flush, const void *ptr, ssize_t l)
{
struct busyobj *bo;
diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c
index 6e8de47..c4cda48 100644
--- a/bin/varnishd/http1/cache_http1_fsm.c
+++ b/bin/varnishd/http1/cache_http1_fsm.c
@@ -74,7 +74,7 @@ http1_getstate(const struct sess *sp)
* Call protocol for this request
*/
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
http1_req(struct worker *wrk, void *arg)
{
struct req *req;
@@ -101,7 +101,7 @@ http1_req(struct worker *wrk, void *arg)
* must obey this calling convention with a dummy reservation.
*/
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
http1_new_session(struct worker *wrk, void *arg)
{
struct sess *sp;
@@ -120,7 +120,7 @@ http1_new_session(struct worker *wrk, void *arg)
wrk->task.priv = req;
}
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
http1_unwait(struct worker *wrk, void *arg)
{
struct sess *sp;
@@ -138,7 +138,7 @@ http1_unwait(struct worker *wrk, void *arg)
wrk->task.priv = req;
}
-static void __match_proto__(vtr_req_body_t)
+static void v_matchproto_(vtr_req_body_t)
http1_req_body(struct req *req)
{
@@ -169,7 +169,7 @@ http1_req_panic(struct vsb *vsb, const struct req *req)
VSB_printf(vsb, "state = %s\n", http1_getstate(req->sp));
}
-static void __match_proto__(vtr_req_fail_f)
+static void v_matchproto_(vtr_req_fail_f)
http1_req_fail(struct req *req, enum sess_close reason)
{
assert(reason > 0);
@@ -178,7 +178,7 @@ http1_req_fail(struct req *req, enum sess_close reason)
SES_Close(req->sp, reason);
}
-static void __match_proto__(vtr_reembark_f)
+static void v_matchproto_(vtr_reembark_f)
http1_reembark(struct worker *wrk, struct req *req)
{
struct sess *sp;
@@ -203,7 +203,7 @@ http1_reembark(struct worker *wrk, struct req *req)
usleep(10000);
}
-static int __match_proto__(vtr_minimal_response_f)
+static int v_matchproto_(vtr_minimal_response_f)
http1_minimal_response(struct req *req, uint16_t status)
{
size_t wl, l;
diff --git a/bin/varnishd/http1/cache_http1_proto.c b/bin/varnishd/http1/cache_http1_proto.c
index 4cc8b4d..b3fbde7 100644
--- a/bin/varnishd/http1/cache_http1_proto.c
+++ b/bin/varnishd/http1/cache_http1_proto.c
@@ -64,7 +64,7 @@ const int HTTP1_Resp[3] = {
* Check if we have a complete HTTP request or response yet
*/
-enum htc_status_e __match_proto__(htc_complete_f)
+enum htc_status_e v_matchproto_(htc_complete_f)
HTTP1_Complete(struct http_conn *htc)
{
char *p;
diff --git a/bin/varnishd/http1/cache_http1_vfp.c b/bin/varnishd/http1/cache_http1_vfp.c
index 38cfde8..36228cc 100644
--- a/bin/varnishd/http1/cache_http1_vfp.c
+++ b/bin/varnishd/http1/cache_http1_vfp.c
@@ -91,7 +91,7 @@ v1f_read(const struct vfp_ctx *vc, struct http_conn *htc, void *d, ssize_t len)
* XXX: Reading one byte at a time is pretty pessimal.
*/
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
v1f_pull_chunked(struct vfp_ctx *vc, struct vfp_entry *vfe, void *ptr,
ssize_t *lp)
{
@@ -187,7 +187,7 @@ static const struct vfp v1f_chunked = {
/*--------------------------------------------------------------------*/
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
v1f_pull_straight(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
ssize_t *lp)
{
@@ -224,7 +224,7 @@ static const struct vfp v1f_straight = {
/*--------------------------------------------------------------------*/
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
v1f_pull_eof(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p, ssize_t *lp)
{
ssize_t l, lr;
diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index f01a120..fc3eeca 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -72,7 +72,7 @@ V2D_Init(void)
/**********************************************************************/
-static int __match_proto__(vdp_bytes)
+static int v_matchproto_(vdp_bytes)
h2_bytes(struct req *req, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
@@ -126,7 +126,7 @@ h2_status(uint8_t *p, uint16_t status) {
return (l);
}
-int __match_proto__(vtr_minimal_response_f)
+int v_matchproto_(vtr_minimal_response_f)
h2_minimal_response(struct req *req, uint16_t status)
{
struct h2_req *r2;
@@ -178,7 +178,7 @@ h2_enc_len(uint8_t *p, unsigned bits, unsigned val)
return (p);
}
-void __match_proto__(vtr_deliver_f)
+void v_matchproto_(vtr_deliver_f)
h2_deliver(struct req *req, struct boc *boc, int sendbody)
{
ssize_t sz, sz1;
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 3ad572b..a43bc5c 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -266,7 +266,7 @@ h2_vsl_frame(const struct h2_sess *h2, const void *ptr, size_t len)
/**********************************************************************
*/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_ping(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
@@ -287,7 +287,7 @@ h2_rx_ping(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/**********************************************************************
*/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_push_promise(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
@@ -301,7 +301,7 @@ h2_rx_push_promise(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/**********************************************************************
*/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_rst_stream(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
@@ -319,7 +319,7 @@ h2_rx_rst_stream(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/**********************************************************************
*/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_goaway(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
@@ -337,7 +337,7 @@ h2_rx_goaway(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/**********************************************************************
*/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_window_update(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
uint32_t wu;
@@ -367,7 +367,7 @@ h2_rx_window_update(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
* Incoming PRIORITY, possibly an ACK of one we sent.
*/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_priority(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
@@ -382,7 +382,7 @@ h2_rx_priority(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
*/
#define H2_SETTING(U,l, ...) \
-static void __match_proto__(h2_setsetting_f) \
+static void v_matchproto_(h2_setsetting_f) \
h2_setting_##l(struct h2_settings* s, uint32_t v) \
{ \
s -> l = v; \
@@ -440,7 +440,7 @@ h2_set_setting(struct h2_sess *h2, const uint8_t *d)
return (0);
}
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_settings(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
const uint8_t *p;
@@ -476,7 +476,7 @@ h2_rx_settings(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
* Incoming HEADERS, this is where the partys at...
*/
-void __match_proto__(task_func_t)
+void v_matchproto_(task_func_t)
h2_do_req(struct worker *wrk, void *priv)
{
struct req *req;
@@ -547,7 +547,7 @@ h2_end_headers(struct worker *wrk, struct h2_sess *h2,
return (0);
}
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
struct req *req;
@@ -624,7 +624,7 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/**********************************************************************/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_continuation(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
struct req *req;
@@ -653,7 +653,7 @@ h2_rx_continuation(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
/**********************************************************************/
-static h2_error __match_proto__(h2_frame_f)
+static h2_error v_matchproto_(h2_frame_f)
h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{
int w1 = 0, w2 = 0;
@@ -699,7 +699,7 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
return (0);
}
-static enum vfp_status __match_proto__(vfp_pull_f)
+static enum vfp_status v_matchproto_(vfp_pull_f)
h2_vfp_body(struct vfp_ctx *vc, struct vfp_entry *vfe, void *ptr, ssize_t *lp)
{
struct h2_req *r2;
@@ -750,7 +750,7 @@ static const struct vfp h2_body = {
.pull = h2_vfp_body,
};
-void __match_proto__(vtr_req_body_t)
+void v_matchproto_(vtr_req_body_t)
h2_req_body(struct req *req)
{
struct h2_req *r2;
@@ -765,7 +765,7 @@ h2_req_body(struct req *req)
/**********************************************************************/
-void __match_proto__(vtr_req_fail_f)
+void v_matchproto_(vtr_req_fail_f)
h2_req_fail(struct req *req, enum sess_close reason)
{
assert(reason > 0);
@@ -775,7 +775,7 @@ h2_req_fail(struct req *req, enum sess_close reason)
/**********************************************************************/
-static enum htc_status_e __match_proto__(htc_complete_f)
+static enum htc_status_e v_matchproto_(htc_complete_f)
h2_frame_complete(struct http_conn *htc)
{
int l;
diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index b00395f..fcee836 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -116,7 +116,7 @@ h2_new_sess(const struct worker *wrk, struct sess *sp, struct req *srq)
/**********************************************************************/
-enum htc_status_e __match_proto__(htc_complete_f)
+enum htc_status_e v_matchproto_(htc_complete_f)
H2_prism_complete(struct http_conn *htc)
{
int l;
@@ -270,7 +270,7 @@ H2_OU_Sess(struct worker *wrk, struct sess *sp, struct req *req)
SES_SetTransport(wrk, sp, req, &H2_transport);
}
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
h2_new_session(struct worker *wrk, void *arg)
{
struct req *req;
@@ -351,7 +351,7 @@ h2_new_session(struct worker *wrk, void *arg)
h2_del_req(wrk, h2->req0);
}
-static void __match_proto__(vtr_reembark_f)
+static void v_matchproto_(vtr_reembark_f)
h2_reembark(struct worker *wrk, struct req *req)
{
struct sess *sp;
diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h
index cde0c11..9a03a4a 100644
--- a/bin/varnishd/mgt/mgt.h
+++ b/bin/varnishd/mgt/mgt.h
@@ -38,10 +38,11 @@
#include <sys/types.h>
+#include "vdef.h"
+
#include "miniobj.h"
#include "vas.h"
#include "vcs.h"
-#include "vdef.h"
#include "vqueue.h"
#include "vsb.h"
@@ -82,7 +83,7 @@ typedef int mgt_cli_close_f(void *priv);
void mgt_cli_setup(int fdi, int fdo, int auth, const char *ident,
mgt_cli_close_f *close_func, void *priv);
int mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void mgt_cli_start_child(int fdi, int fdo);
void mgt_cli_stop_child(void);
void mgt_cli_telnet(const char *T_arg);
@@ -167,7 +168,7 @@ enum mcf_which_e {
MCF_MAXIMUM = 34,
};
void MCF_ParamConf(enum mcf_which_e, const char *param, const char *, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void MCF_ParamSet(struct cli *, const char *param, const char *val);
void MCF_ParamProtect(struct cli *, const char *arg);
@@ -193,7 +194,7 @@ char *mgt_HostName(void);
void mgt_ProcTitle(const char *comp);
void mgt_DumpRstVsl(void);
struct vsb *mgt_BuildVident(void);
-void MGT_Complain(const char *, const char *, ...) __v_printflike(2, 3);
+void MGT_Complain(const char *, const char *, ...) v_printflike_(2, 3);
const void *MGT_Pick(const struct choice *, const char *, const char *);
char **MGT_NamedArg(const char *, const char **, const char *);
diff --git a/bin/varnishd/mgt/mgt_acceptor.c b/bin/varnishd/mgt/mgt_acceptor.c
index e834786..0006716 100644
--- a/bin/varnishd/mgt/mgt_acceptor.c
+++ b/bin/varnishd/mgt/mgt_acceptor.c
@@ -99,7 +99,7 @@ MAC_reopen_sockets(void)
/*--------------------------------------------------------------------*/
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
mac_callback(void *priv, const struct suckaddr *sa)
{
struct listen_arg *la;
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 7c9f3c0..c0ce43d 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -116,7 +116,7 @@ mgt_panic_clear(void)
VSB_destroy(&child_panic);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mch_cli_panic_show(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
@@ -132,7 +132,7 @@ mch_cli_panic_show(struct cli *cli, const char * const *av, void *priv)
VCLI_Out(cli, "%s\n", VSB_data(child_panic));
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mch_cli_panic_clear(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
@@ -204,7 +204,7 @@ MCH_Fd_Inherit(int fd, const char *what)
* Listen to stdout+stderr from the child
*/
-static int __match_proto__(vlu_f)
+static int v_matchproto_(vlu_f)
child_line(void *priv, const char *p)
{
(void)priv;
@@ -217,7 +217,7 @@ child_line(void *priv, const char *p)
* NB: Notice cleanup call from mgt_reap_child()
*/
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
child_listener(const struct vev *e, int what)
{
@@ -234,7 +234,7 @@ child_listener(const struct vev *e, int what)
* Periodically poke the child, to see that it still lives
*/
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
child_poker(const struct vev *e, int what)
{
char *r = NULL;
@@ -611,7 +611,7 @@ MCH_Running(void)
* CLI commands
*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mch_cli_server_start(struct cli *cli, const char * const *av, void *priv)
{
@@ -630,7 +630,7 @@ mch_cli_server_start(struct cli *cli, const char * const *av, void *priv)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mch_cli_server_stop(struct cli *cli, const char * const *av, void *priv)
{
@@ -644,7 +644,7 @@ mch_cli_server_stop(struct cli *cli, const char * const *av, void *priv)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mch_cli_server_status(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 9f0a67d..bc9c2a7 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -72,7 +72,7 @@ static struct vsb *cli_buf = NULL;
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_banner(struct cli *cli, const char *const *av, void *priv)
{
@@ -100,7 +100,7 @@ static struct cli_proto cli_proto[] = {
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_panic(struct cli *cli, const char * const *av, void *priv)
{
@@ -117,7 +117,7 @@ static struct cli_proto cli_debug[] = {
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_askchild(struct cli *cli, const char * const *av, void *priv)
{
int i;
@@ -307,7 +307,7 @@ mcf_auth(struct cli *cli, const char *const *av, void *priv)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_help(struct cli *cli, const char * const *av, void *priv)
{
if (cli_o <= 0)
@@ -316,7 +316,7 @@ mcf_help(struct cli *cli, const char * const *av, void *priv)
mcf_askchild(cli, av, priv);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_help_json(struct cli *cli, const char * const *av, void *priv)
{
if (cli_o <= 0)
@@ -506,7 +506,7 @@ mgt_cli_secret(const char *S_arg)
secret_file = S_arg;
}
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
mct_callback(void *priv, const struct suckaddr *sa)
{
int sock;
@@ -572,7 +572,7 @@ static double M_poll = 0.1;
static VTAILQ_HEAD(,m_addr) m_addr_list =
VTAILQ_HEAD_INITIALIZER(m_addr_list);
-static int __match_proto__(mgt_cli_close_f)
+static int v_matchproto_(mgt_cli_close_f)
Marg_closer(void *priv)
{
@@ -581,7 +581,7 @@ Marg_closer(void *priv)
return(0);
}
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
Marg_connect(const struct vev *e, int what)
{
struct vsb *vsb;
@@ -609,7 +609,7 @@ Marg_connect(const struct vev *e, int what)
return (1);
}
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
Marg_poker(const struct vev *e, int what)
{
int s;
@@ -643,7 +643,7 @@ Marg_poker(const struct vev *e, int what)
return (0);
}
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
marg_cb(void *priv, const struct suckaddr *sa)
{
struct m_addr *ma;
diff --git a/bin/varnishd/mgt/mgt_jail.c b/bin/varnishd/mgt/mgt_jail.c
index b413821..1e26487 100644
--- a/bin/varnishd/mgt/mgt_jail.c
+++ b/bin/varnishd/mgt/mgt_jail.c
@@ -47,7 +47,7 @@
* A "none" jail implementation which doesn't do anything.
*/
-static int __match_proto__(jail_init_f)
+static int v_matchproto_(jail_init_f)
vjn_init(char **args)
{
if (args != NULL && *args != NULL)
@@ -55,13 +55,13 @@ vjn_init(char **args)
return (0);
}
-static void __match_proto__(jail_master_f)
+static void v_matchproto_(jail_master_f)
vjn_master(enum jail_master_e jme)
{
(void)jme;
}
-static void __match_proto__(jail_subproc_f)
+static void v_matchproto_(jail_subproc_f)
vjn_subproc(enum jail_subproc_e jse)
{
(void)jse;
diff --git a/bin/varnishd/mgt/mgt_jail_solaris.c b/bin/varnishd/mgt/mgt_jail_solaris.c
index 55d8b3b..338cae3 100644
--- a/bin/varnishd/mgt/mgt_jail_solaris.c
+++ b/bin/varnishd/mgt/mgt_jail_solaris.c
@@ -252,7 +252,7 @@ jail_master_gen(enum jail_master_e e)
return (enum jail_gen_e)(e << JAILG_SHIFT);
}
-static int __match_proto__(jail_init_f)
+static int v_matchproto_(jail_init_f)
vjs_init(char **args)
{
(void)args;
@@ -499,7 +499,7 @@ vjs_waive(enum jail_gen_e jge)
priv_freeset(inheritable);
}
-static void __match_proto__(jail_subproc_f)
+static void v_matchproto_(jail_subproc_f)
vjs_subproc(enum jail_subproc_e jse)
{
enum jail_gen_e jge = jail_subproc_gen(jse);
@@ -508,7 +508,7 @@ vjs_subproc(enum jail_subproc_e jse)
vjs_waive(jge);
}
-static void __match_proto__(jail_master_f)
+static void v_matchproto_(jail_master_f)
vjs_master(enum jail_master_e jme)
{
enum jail_gen_e jge = jail_master_gen(jme);
diff --git a/bin/varnishd/mgt/mgt_jail_unix.c b/bin/varnishd/mgt/mgt_jail_unix.c
index 27cebb1..c4ba4c5 100644
--- a/bin/varnishd/mgt/mgt_jail_unix.c
+++ b/bin/varnishd/mgt/mgt_jail_unix.c
@@ -120,7 +120,7 @@ vju_getccgid(const char *arg)
/**********************************************************************
*/
-static int __match_proto__(jail_init_f)
+static int v_matchproto_(jail_init_f)
vju_init(char **args)
{
if (args == NULL) {
@@ -184,7 +184,7 @@ vju_init(char **args)
return (0);
}
-static void __match_proto__(jail_master_f)
+static void v_matchproto_(jail_master_f)
vju_master(enum jail_master_e jme)
{
if (jme == JAIL_MASTER_LOW) {
@@ -196,7 +196,7 @@ vju_master(enum jail_master_e jme)
}
}
-static void __match_proto__(jail_subproc_f)
+static void v_matchproto_(jail_subproc_f)
vju_subproc(enum jail_subproc_e jse)
{
int i;
@@ -239,7 +239,7 @@ vju_subproc(enum jail_subproc_e jse)
#endif
}
-static int __match_proto__(jail_make_dir_f)
+static int v_matchproto_(jail_make_dir_f)
vju_make_vcldir(const char *dname)
{
AZ(seteuid(0));
@@ -255,7 +255,7 @@ vju_make_vcldir(const char *dname)
}
-static void __match_proto__(jail_fixfd_f)
+static void v_matchproto_(jail_fixfd_f)
vju_fixfd(int fd, enum jail_fixfd_e what)
{
/* Called under JAIL_MASTER_FILE */
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index b7e8251..9aee532 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -181,7 +181,7 @@ cli_check(const struct cli *cli)
* This function is called when the CLI on stdin is closed.
*/
-static int __match_proto__(mgt_cli_close_f)
+static int v_matchproto_(mgt_cli_close_f)
mgt_stdin_close(void *priv)
{
@@ -347,7 +347,7 @@ mgt_eric_im_done(int eric_fd, unsigned u)
/*--------------------------------------------------------------------*/
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
mgt_sigint(const struct vev *e, int what)
{
@@ -362,7 +362,7 @@ mgt_sigint(const struct vev *e, int what)
/*--------------------------------------------------------------------*/
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
mgt_uptime(const struct vev *e, int what)
{
static double mgt_uptime_t0 = 0;
@@ -378,7 +378,7 @@ mgt_uptime(const struct vev *e, int what)
/*--------------------------------------------------------------------*/
-static int __match_proto__(mgt_cli_close_f)
+static int v_matchproto_(mgt_cli_close_f)
mgt_I_close(void *priv)
{
(void)priv;
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 9cb4900..2d262e9 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -235,7 +235,7 @@ mcf_wrap(struct cli *cli, const char *text)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_param_show(struct cli *cli, const char * const *av, void *priv)
{
int n;
@@ -401,7 +401,7 @@ MCF_ParamSet(struct cli *cli, const char *param, const char *val)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_param_set(struct cli *cli, const char * const *av, void *priv)
{
diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index 42f4b6d..3c01059 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -83,7 +83,7 @@ mgt_DumpBuiltin(void)
* Invoke system VCC compiler in a sub-process
*/
-static void __match_proto__(vsub_func_f)
+static void v_matchproto_(vsub_func_f)
run_vcc(void *priv)
{
struct vsb *csrc;
@@ -137,7 +137,7 @@ run_vcc(void *priv)
* Invoke system C compiler in a sub-process
*/
-static void __match_proto__(vsub_func_f)
+static void v_matchproto_(vsub_func_f)
run_cc(void *priv)
{
struct vcc_priv *vp;
@@ -189,7 +189,7 @@ run_cc(void *priv)
* Attempt to open compiled VCL in a sub-process
*/
-static void __match_proto__(vsub_func_f)
+static void v_matchproto_(vsub_func_f)
run_dlopen(void *priv)
{
struct vcc_priv *vp;
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index 671fc21..ae31eed 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -603,7 +603,7 @@ mgt_push_vcls_and_start(struct cli *cli, unsigned *status, char **p)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_inline(struct cli *cli, const char * const *av, void *priv)
{
@@ -615,7 +615,7 @@ mcf_vcl_inline(struct cli *cli, const char * const *av, void *priv)
mgt_new_vcl(cli, av[2], av[3], "<vcl.inline>", av[4], 0);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_load(struct cli *cli, const char * const *av, void *priv)
{
@@ -627,7 +627,7 @@ mcf_vcl_load(struct cli *cli, const char * const *av, void *priv)
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_state(struct cli *cli, const char * const *av, void *priv)
{
struct vclprog *vp;
@@ -674,7 +674,7 @@ mcf_vcl_state(struct cli *cli, const char * const *av, void *priv)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_use(struct cli *cli, const char * const *av, void *priv)
{
unsigned status;
@@ -707,7 +707,7 @@ mcf_vcl_use(struct cli *cli, const char * const *av, void *priv)
free(p);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_discard(struct cli *cli, const char * const *av, void *priv)
{
unsigned status;
@@ -757,7 +757,7 @@ mcf_vcl_discard(struct cli *cli, const char * const *av, void *priv)
mgt_vcl_del(vp);
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_list(struct cli *cli, const char * const *av, void *priv)
{
unsigned status;
@@ -799,7 +799,7 @@ mcf_vcl_list(struct cli *cli, const char * const *av, void *priv)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
mcf_vcl_label(struct cli *cli, const char * const *av, void *priv)
{
struct vclprog *vpl;
@@ -870,7 +870,7 @@ mcf_vcl_label(struct cli *cli, const char * const *av, void *priv)
/*--------------------------------------------------------------------*/
-static int __match_proto__(vev_cb_f)
+static int v_matchproto_(vev_cb_f)
mgt_vcl_poker(const struct vev *e, int what)
{
struct vclprog *vp;
diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c
index b25347f..1ec3a6b 100644
--- a/bin/varnishd/proxy/cache_proxy_proto.c
+++ b/bin/varnishd/proxy/cache_proxy_proto.c
@@ -288,7 +288,7 @@ vpx_proto2(const struct worker *wrk, struct req *req)
* HTC_Rx completion detector
*/
-static enum htc_status_e __match_proto__(htc_complete_f)
+static enum htc_status_e v_matchproto_(htc_complete_f)
vpx_complete(struct http_conn *htc)
{
int i, l, j;
@@ -331,7 +331,7 @@ vpx_complete(struct http_conn *htc)
return (HTC_S_MORE);
}
-static void __match_proto__(task_func_t)
+static void v_matchproto_(task_func_t)
vpx_new_session(struct worker *wrk, void *arg)
{
struct req *req;
diff --git a/bin/varnishd/storage/mgt_stevedore.c b/bin/varnishd/storage/mgt_stevedore.c
index ef44695..8ebfca2 100644
--- a/bin/varnishd/storage/mgt_stevedore.c
+++ b/bin/varnishd/storage/mgt_stevedore.c
@@ -69,7 +69,7 @@ STV__iter(struct stevedore ** const pp)
/*--------------------------------------------------------------------*/
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
stv_cli_list(struct cli *cli, const char * const *av, void *priv)
{
struct stevedore *stv;
@@ -92,7 +92,7 @@ static struct cli_proto cli_stv[] = {
/*--------------------------------------------------------------------
*/
-static void __match_proto__(storage_init_f)
+static void v_matchproto_(storage_init_f)
smp_fake_init(struct stevedore *parent, int ac, char * const *av)
{
diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c
index c9e80f6..49835eb 100644
--- a/bin/varnishd/storage/stevedore.c
+++ b/bin/varnishd/storage/stevedore.c
@@ -199,7 +199,7 @@ VRT_Stv(const char *nm)
return (0);
}
-const char * __match_proto__()
+const char * v_matchproto_()
VRT_STEVEDORE_string(VCL_STEVEDORE s)
{
if (s == NULL)
diff --git a/bin/varnishd/storage/storage_file.c b/bin/varnishd/storage/storage_file.c
index c3fbd9f..285a62d 100644
--- a/bin/varnishd/storage/storage_file.c
+++ b/bin/varnishd/storage/storage_file.c
@@ -401,7 +401,7 @@ smf_open_chunk(struct smf_sc *sc, off_t sz, off_t off, off_t *fail, off_t *sum)
smf_open_chunk(sc, sz - h, off + h, fail, sum);
}
-static void __match_proto__(storage_open_f)
+static void v_matchproto_(storage_open_f)
smf_open(struct stevedore *st)
{
struct smf_sc *sc;
@@ -430,7 +430,7 @@ smf_open(struct stevedore *st)
/*--------------------------------------------------------------------*/
-static struct storage * __match_proto__(sml_alloc_f)
+static struct storage * v_matchproto_(sml_alloc_f)
smf_alloc(const struct stevedore *st, size_t size)
{
struct smf *smf;
@@ -466,7 +466,7 @@ smf_alloc(const struct stevedore *st, size_t size)
/*--------------------------------------------------------------------*/
-static void __match_proto__(sml_free_f)
+static void v_matchproto_(sml_free_f)
smf_free(struct storage *s)
{
struct smf *smf;
diff --git a/bin/varnishd/storage/storage_lru.c b/bin/varnishd/storage/storage_lru.c
index 6ebff17..cc84b97 100644
--- a/bin/varnishd/storage/storage_lru.c
+++ b/bin/varnishd/storage/storage_lru.c
@@ -120,7 +120,7 @@ LRU_Remove(struct objcore *oc)
Lck_Unlock(&lru->mtx);
}
-void __match_proto__(objtouch_f)
+void v_matchproto_(objtouch_f)
LRU_Touch(struct worker *wrk, struct objcore *oc, double now)
{
struct lru *lru;
diff --git a/bin/varnishd/storage/storage_malloc.c b/bin/varnishd/storage/storage_malloc.c
index 9fe13b5..e82217e 100644
--- a/bin/varnishd/storage/storage_malloc.c
+++ b/bin/varnishd/storage/storage_malloc.c
@@ -63,7 +63,7 @@ struct sma {
static struct VSC_lck *lck_sma;
-static struct storage * __match_proto__(sml_alloc_f)
+static struct storage * v_matchproto_(sml_alloc_f)
sma_alloc(const struct stevedore *st, size_t size)
{
struct sma_sc *sma_sc;
@@ -129,7 +129,7 @@ sma_alloc(const struct stevedore *st, size_t size)
return (&sma->s);
}
-static void __match_proto__(sml_free_f)
+static void v_matchproto_(sml_free_f)
sma_free(struct storage *s)
{
struct sma_sc *sma_sc;
@@ -151,7 +151,7 @@ sma_free(struct storage *s)
free(sma);
}
-static VCL_BYTES __match_proto__(stv_var_used_space)
+static VCL_BYTES v_matchproto_(stv_var_used_space)
sma_used_space(const struct stevedore *st)
{
struct sma_sc *sma_sc;
@@ -160,7 +160,7 @@ sma_used_space(const struct stevedore *st)
return (sma_sc->sma_alloc);
}
-static VCL_BYTES __match_proto__(stv_var_free_space)
+static VCL_BYTES v_matchproto_(stv_var_free_space)
sma_free_space(const struct stevedore *st)
{
struct sma_sc *sma_sc;
@@ -202,7 +202,7 @@ sma_init(struct stevedore *parent, int ac, char * const *av)
sc->sma_max = u;
}
-static void __match_proto__(storage_open_f)
+static void v_matchproto_(storage_open_f)
sma_open(struct stevedore *st)
{
struct sma_sc *sma_sc;
diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index bfc082a..59af759 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -276,7 +276,7 @@ smp_open_segs(struct smp_sc *sc, struct smp_signspace *spc)
* Silo worker thread
*/
-static void * __match_proto__(bgthread_t)
+static void * v_matchproto_(bgthread_t)
smp_thread(struct worker *wrk, void *priv)
{
struct smp_sc *sc;
@@ -319,7 +319,7 @@ smp_thread(struct worker *wrk, void *priv)
* Open a silo in the worker process
*/
-static void __match_proto__(storage_open_f)
+static void v_matchproto_(storage_open_f)
smp_open(struct stevedore *st)
{
struct smp_sc *sc;
@@ -388,7 +388,7 @@ smp_open(struct stevedore *st)
* Close a silo
*/
-static void __match_proto__(storage_close_f)
+static void v_matchproto_(storage_close_f)
smp_close(const struct stevedore *st, int warn)
{
struct smp_sc *sc;
@@ -502,7 +502,7 @@ smp_allocx(const struct stevedore *st, size_t min_size, size_t max_size,
* Allocate an object
*/
-static int __match_proto__(storage_allocobj_f)
+static int v_matchproto_(storage_allocobj_f)
smp_allocobj(struct worker *wrk, const struct stevedore *stv,
struct objcore *oc, unsigned wsl)
{
@@ -578,7 +578,7 @@ smp_allocobj(struct worker *wrk, const struct stevedore *stv,
* Allocate a bite
*/
-static struct storage * __match_proto__(sml_alloc_f)
+static struct storage * v_matchproto_(sml_alloc_f)
smp_alloc(const struct stevedore *st, size_t size)
{
@@ -630,7 +630,7 @@ debug_report_silo(struct cli *cli, const struct smp_sc *sc)
}
}
-static void __match_proto__(cli_func_t)
+static void v_matchproto_(cli_func_t)
debug_persistent(struct cli *cli, const char * const * av, void *priv)
{
struct smp_sc *sc;
diff --git a/bin/varnishd/storage/storage_persistent_silo.c b/bin/varnishd/storage/storage_persistent_silo.c
index 6718065..aa38315 100644
--- a/bin/varnishd/storage/storage_persistent_silo.c
+++ b/bin/varnishd/storage/storage_persistent_silo.c
@@ -390,7 +390,7 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg,
* objcore methods for persistent objects
*/
-struct object * __match_proto__(sml_getobj_f)
+struct object * v_matchproto_(sml_getobj_f)
smp_sml_getobj(struct worker *wrk, struct objcore *oc)
{
struct object *o;
@@ -454,7 +454,7 @@ smp_sml_getobj(struct worker *wrk, struct objcore *oc)
return (o);
}
-void __match_proto__(objfree_f)
+void v_matchproto_(objfree_f)
smp_oc_objfree(struct worker *wrk, struct objcore *oc)
{
struct smp_seg *sg;
@@ -498,7 +498,7 @@ smp_init_oc(struct objcore *oc, struct smp_seg *sg, unsigned objidx)
/*--------------------------------------------------------------------*/
-void __match_proto__(obj_event_f)
+void v_matchproto_(obj_event_f)
smp_oc_event(struct worker *wrk, void *priv, struct objcore *oc, unsigned ev)
{
struct stevedore *st;
diff --git a/bin/varnishd/storage/storage_simple.c b/bin/varnishd/storage/storage_simple.c
index 38e21f2..776f5f7 100644
--- a/bin/varnishd/storage/storage_simple.c
+++ b/bin/varnishd/storage/storage_simple.c
@@ -125,7 +125,7 @@ SML_MkObject(const struct stevedore *stv, struct objcore *oc, void *ptr)
* implement persistent storage can rely on.
*/
-int __match_proto__(storage_allocobj_f)
+int v_matchproto_(storage_allocobj_f)
SML_allocobj(struct worker *wrk, const struct stevedore *stv,
struct objcore *oc, unsigned wsl)
{
@@ -180,7 +180,7 @@ sml_getobj(struct worker *wrk, struct objcore *oc)
return (o);
}
-static void __match_proto__(objslim_f)
+static void v_matchproto_(objslim_f)
sml_slim(struct worker *wrk, struct objcore *oc)
{
const struct stevedore *stv;
@@ -208,7 +208,7 @@ sml_slim(struct worker *wrk, struct objcore *oc)
}
}
-static void __match_proto__(objfree_f)
+static void v_matchproto_(objfree_f)
sml_objfree(struct worker *wrk, struct objcore *oc)
{
struct object *o;
@@ -229,7 +229,7 @@ sml_objfree(struct worker *wrk, struct objcore *oc)
wrk->stats->n_object--;
}
-static int __match_proto__(objiterate_f)
+static int v_matchproto_(objiterate_f)
sml_iterator(struct worker *wrk, struct objcore *oc,
void *priv, objiterate_f *func, int final)
{
@@ -365,7 +365,7 @@ objallocwithnuke(struct worker *wrk, const struct stevedore *stv, size_t size,
return (st);
}
-static int __match_proto__(objgetspace_f)
+static int v_matchproto_(objgetspace_f)
sml_getspace(struct worker *wrk, struct objcore *oc, ssize_t *sz,
uint8_t **ptr)
{
@@ -405,7 +405,7 @@ sml_getspace(struct worker *wrk, struct objcore *oc, ssize_t *sz,
return (1);
}
-static void __match_proto__(objextend_f)
+static void v_matchproto_(objextend_f)
sml_extend(struct worker *wrk, struct objcore *oc, ssize_t l)
{
struct object *o;
@@ -422,7 +422,7 @@ sml_extend(struct worker *wrk, struct objcore *oc, ssize_t l)
st->len += l;
}
-static void __match_proto__(objtrimstore_f)
+static void v_matchproto_(objtrimstore_f)
sml_trimstore(struct worker *wrk, struct objcore *oc)
{
const struct stevedore *stv;
@@ -473,7 +473,7 @@ sml_trimstore(struct worker *wrk, struct objcore *oc)
oc->boc->stevedore_priv = st;
}
-static void __match_proto__(objbocdone_f)
+static void v_matchproto_(objbocdone_f)
sml_bocdone(struct worker *wrk, struct objcore *oc, struct boc *boc)
{
const struct stevedore *stv;
@@ -500,7 +500,7 @@ sml_bocdone(struct worker *wrk, struct objcore *oc, struct boc *boc)
}
}
-static const void * __match_proto__(objgetattr_f)
+static const void * v_matchproto_(objgetattr_f)
sml_getattr(struct worker *wrk, struct objcore *oc, enum obj_attr attr,
ssize_t *len)
{
@@ -547,7 +547,7 @@ sml_getattr(struct worker *wrk, struct objcore *oc, enum obj_attr attr,
WRONG("Unsupported OBJ_ATTR");
}
-static void * __match_proto__(objsetattr_f)
+static void * v_matchproto_(objsetattr_f)
sml_setattr(struct worker *wrk, struct objcore *oc, enum obj_attr attr,
ssize_t len, const void *ptr)
{
diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c
index 23244e1..0510412 100644
--- a/bin/varnishd/storage/storage_umem.c
+++ b/bin/varnishd/storage/storage_umem.c
@@ -82,7 +82,7 @@ smu_smu_init(struct smu *smu, struct smu_sc *sc)
smu->sc = sc;
}
-static int __match_proto__(umem_constructor_t)
+static int v_matchproto_(umem_constructor_t)
smu_smu_constructor(void *buffer, void *callback_data, int flags)
{
struct smu *smu = buffer;
@@ -94,7 +94,7 @@ smu_smu_constructor(void *buffer, void *callback_data, int flags)
return (0);
}
-static void __match_proto__(umem_destructor_t)
+static void v_matchproto_(umem_destructor_t)
smu_smu_destructor(void *buffer, void *callback_data)
{
struct smu *smu;
@@ -109,7 +109,7 @@ static void __match_proto__(umem_destructor_t)
static struct VSC_lck *lck_smu;
-static struct storage * __match_proto__(sml_alloc_f)
+static struct storage * v_matchproto_(sml_alloc_f)
smu_alloc(const struct stevedore *st, size_t size)
{
struct smu_sc *smu_sc;
@@ -172,7 +172,7 @@ smu_alloc(const struct stevedore *st, size_t size)
return (&smu->s);
}
-static void __match_proto__(sml_free_f)
+static void v_matchproto_(sml_free_f)
smu_free(struct storage *s)
{
struct smu *smu;
@@ -196,7 +196,7 @@ smu_free(struct storage *s)
umem_cache_free(sc->smu_cache, smu);
}
-static VCL_BYTES __match_proto__(stv_var_used_space)
+static VCL_BYTES v_matchproto_(stv_var_used_space)
smu_used_space(const struct stevedore *st)
{
struct smu_sc *smu_sc;
@@ -205,7 +205,7 @@ smu_used_space(const struct stevedore *st)
return (smu_sc->smu_alloc);
}
-static VCL_BYTES __match_proto__(stv_var_free_space)
+static VCL_BYTES v_matchproto_(stv_var_free_space)
smu_free_space(const struct stevedore *st)
{
struct smu_sc *smu_sc;
@@ -247,7 +247,7 @@ smu_init(struct stevedore *parent, int ac, char * const *av)
sc->smu_max = u;
}
-static void __match_proto__(storage_open_f)
+static void v_matchproto_(storage_open_f)
smu_open(struct stevedore *st)
{
struct smu_sc *smu_sc;
@@ -275,7 +275,7 @@ smu_open(struct stevedore *st)
AN(smu_sc->smu_cache);
}
-static void __match_proto__(storage_close_f)
+static void v_matchproto_(storage_close_f)
smu_close(const struct stevedore *st, int warn)
{
struct smu_sc *smu_sc;
diff --git a/bin/varnishd/waiter/cache_waiter.c b/bin/varnishd/waiter/cache_waiter.c
index f4ec53b..fc31642 100644
--- a/bin/varnishd/waiter/cache_waiter.c
+++ b/bin/varnishd/waiter/cache_waiter.c
@@ -40,7 +40,7 @@
#include "waiter/waiter_priv.h"
#include "waiter/mgt_waiter.h"
-static int __match_proto__(binheap_cmp_t)
+static int v_matchproto_(binheap_cmp_t)
waited_cmp(void *priv, const void *a, const void *b)
{
const struct waiter *ww;
@@ -53,7 +53,7 @@ waited_cmp(void *priv, const void *a, const void *b)
return (Wait_When(aa) < Wait_When(bb));
}
-static void __match_proto__(binheap_update_t)
+static void v_matchproto_(binheap_update_t)
waited_update(void *priv, void *p, unsigned u)
{
struct waited *pp;
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
index cede609..9e2e2a3 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
@@ -154,7 +154,7 @@ vwe_thread(void *priv)
/*--------------------------------------------------------------------*/
-static int __match_proto__(waiter_enter_f)
+static int v_matchproto_(waiter_enter_f)
vwe_enter(void *priv, struct waited *wp)
{
struct vwe *vwe;
@@ -176,7 +176,7 @@ vwe_enter(void *priv, struct waited *wp)
/*--------------------------------------------------------------------*/
-static void __match_proto__(waiter_init_f)
+static void v_matchproto_(waiter_init_f)
vwe_init(struct waiter *w)
{
struct vwe *vwe;
@@ -203,7 +203,7 @@ vwe_init(struct waiter *w)
* fail somehow.
*/
-static void __match_proto__(waiter_fini_f)
+static void v_matchproto_(waiter_fini_f)
vwe_fini(struct waiter *w)
{
struct vwe *vwe;
diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c
index 00b1e3b..8ab242e 100644
--- a/bin/varnishd/waiter/cache_waiter_kqueue.c
+++ b/bin/varnishd/waiter/cache_waiter_kqueue.c
@@ -136,7 +136,7 @@ vwk_thread(void *priv)
/*--------------------------------------------------------------------*/
-static int __match_proto__(waiter_enter_f)
+static int v_matchproto_(waiter_enter_f)
vwk_enter(void *priv, struct waited *wp)
{
struct vwk *vwk;
@@ -159,7 +159,7 @@ vwk_enter(void *priv, struct waited *wp)
/*--------------------------------------------------------------------*/
-static void __match_proto__(waiter_init_f)
+static void v_matchproto_(waiter_init_f)
vwk_init(struct waiter *w)
{
struct vwk *vwk;
@@ -185,7 +185,7 @@ vwk_init(struct waiter *w)
* fail somehow.
*/
-static void __match_proto__(waiter_fini_f)
+static void v_matchproto_(waiter_fini_f)
vwk_fini(struct waiter *w)
{
struct vwk *vwk;
diff --git a/bin/varnishd/waiter/cache_waiter_poll.c b/bin/varnishd/waiter/cache_waiter_poll.c
index 363db64..74c65ac 100644
--- a/bin/varnishd/waiter/cache_waiter_poll.c
+++ b/bin/varnishd/waiter/cache_waiter_poll.c
@@ -211,7 +211,7 @@ vwp_main(void *priv)
/*--------------------------------------------------------------------*/
-static int __match_proto__(waiter_enter_f)
+static int v_matchproto_(waiter_enter_f)
vwp_enter(void *priv, struct waited *wp)
{
struct vwp *vwp;
@@ -225,7 +225,7 @@ vwp_enter(void *priv, struct waited *wp)
/*--------------------------------------------------------------------*/
-static void __match_proto__(waiter_init_f)
+static void v_matchproto_(waiter_init_f)
vwp_init(struct waiter *w)
{
struct vwp *vwp;
@@ -249,7 +249,7 @@ vwp_init(struct waiter *w)
* fail somehow.
*/
-static void __match_proto__(waiter_fini_f)
+static void v_matchproto_(waiter_fini_f)
vwp_fini(struct waiter *w)
{
struct vwp *vwp;
diff --git a/bin/varnishd/waiter/cache_waiter_ports.c b/bin/varnishd/waiter/cache_waiter_ports.c
index 428e8e4..4846488 100644
--- a/bin/varnishd/waiter/cache_waiter_ports.c
+++ b/bin/varnishd/waiter/cache_waiter_ports.c
@@ -233,7 +233,7 @@ vws_enter(void *priv, struct waited *wp)
/*--------------------------------------------------------------------*/
-static void __match_proto__(waiter_init_f)
+static void v_matchproto_(waiter_init_f)
vws_init(struct waiter *w)
{
struct vws *vws;
@@ -250,7 +250,7 @@ vws_init(struct waiter *w)
/*--------------------------------------------------------------------*/
-static void __match_proto__(waiter_fini_f)
+static void v_matchproto_(waiter_fini_f)
vws_fini(struct waiter *w)
{
struct vws *vws;
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 4770249..1fed3cb 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -219,7 +219,7 @@ upd_vsl_ts(const char *p)
vsl_ts = t;
}
-static int __match_proto__ (VSLQ_dispatch_f)
+static int v_matchproto_ (VSLQ_dispatch_f)
accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
void *priv)
{
@@ -368,7 +368,7 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
return (0);
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
sighup(struct VUT *v)
{
assert(v == vut);
@@ -376,7 +376,7 @@ sighup(struct VUT *v)
return (1);
}
-static void * __match_proto__(pthread_t)
+static void * v_matchproto_(pthread_t)
do_curses(void *arg)
{
int ch;
@@ -468,7 +468,7 @@ do_curses(void *arg)
/*--------------------------------------------------------------------*/
-static void __attribute__((__noreturn__))
+static void v_noreturn_
usage(int status)
{
const char **opt;
diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index e0a4846..b714f54 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -43,11 +43,12 @@
#define VOPT_DEFINITION
#define VOPT_INC "varnishlog_options.h"
+#include "vdef.h"
+
#include "vapi/vsm.h"
#include "vapi/vsl.h"
#include "vapi/voptget.h"
#include "vas.h"
-#include "vdef.h"
#include "vut.h"
#include "miniobj.h"
@@ -63,7 +64,7 @@ static struct log {
FILE *fo;
} LOG;
-static void __attribute__((__noreturn__))
+static void v_noreturn_
usage(int status)
{
const char **opt;
@@ -89,7 +90,7 @@ openout(int append)
vut->dispatch_priv = LOG.fo;
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
rotateout(struct VUT *v)
{
@@ -102,7 +103,7 @@ rotateout(struct VUT *v)
return (0);
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
flushout(struct VUT *v)
{
@@ -113,7 +114,7 @@ flushout(struct VUT *v)
return (0);
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
sighup(struct VUT *v)
{
assert(v == vut);
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index cc5cb05..6870ab3 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -57,11 +57,12 @@
#define VOPT_DEFINITION
#define VOPT_INC "varnishncsa_options.h"
+#include "vdef.h"
+
#include "b64.h"
#include "vapi/vsl.h"
#include "vapi/voptget.h"
#include "vas.h"
-#include "vdef.h"
#include "vsb.h"
#include "vut.h"
#include "vqueue.h"
@@ -161,7 +162,7 @@ static struct ctx {
int32_t vxid;
} CTX;
-static void __attribute__((__noreturn__))
+static void v_noreturn_
usage(int status)
{
const char **opt;
@@ -184,7 +185,7 @@ openout(int append)
strerror(errno));
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
rotateout(struct VUT *v)
{
@@ -197,7 +198,7 @@ rotateout(struct VUT *v)
return (0);
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
flushout(struct VUT *v)
{
@@ -266,7 +267,7 @@ vsb_fcat(struct vsb *vsb, const struct fragment *f, const char *dflt)
return (-1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_string(const struct format *format)
{
@@ -276,7 +277,7 @@ format_string(const struct format *format)
return (1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_strptr(const struct format *format)
{
@@ -287,7 +288,7 @@ format_strptr(const struct format *format)
return (1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_int32(const struct format *format)
{
@@ -296,7 +297,7 @@ format_int32(const struct format *format)
return (1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_fragment(const struct format *format)
{
@@ -314,7 +315,7 @@ format_fragment(const struct format *format)
return (1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_time(const struct format *format)
{
double t_start, t_end;
@@ -368,7 +369,7 @@ format_time(const struct format *format)
return (1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_requestline(const struct format *format)
{
@@ -388,7 +389,7 @@ format_requestline(const struct format *format)
return (1);
}
-static int __match_proto__(format_f)
+static int v_matchproto_(format_f)
format_auth(const struct format *format)
{
char buf[128];
@@ -922,7 +923,7 @@ process_vsl(const struct vsl_watch_head *head, enum VSL_tag_e tag,
}
}
-static int __match_proto__(VSLQ_dispatch_f)
+static int v_matchproto_(VSLQ_dispatch_f)
dispatch_f(struct VSL_data *vsl, struct VSL_transaction * const pt[],
void *priv)
{
@@ -1107,7 +1108,7 @@ dispatch_f(struct VSL_data *vsl, struct VSL_transaction * const pt[],
return (0);
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
sighup(struct VUT *v)
{
assert(v == vut);
diff --git a/bin/varnishstat/varnishstat.c b/bin/varnishstat/varnishstat.c
index 5b31ee9..1f37397 100644
--- a/bin/varnishstat/varnishstat.c
+++ b/bin/varnishstat/varnishstat.c
@@ -55,7 +55,7 @@ static struct VUT *vut;
/*--------------------------------------------------------------------*/
-static int __match_proto__(VSC_iter_f)
+static int v_matchproto_(VSC_iter_f)
do_xml_cb(void *priv, const struct VSC_point * const pt)
{
uint64_t val;
@@ -93,7 +93,7 @@ do_xml(struct vsm *vsm, struct vsc *vsc)
/*--------------------------------------------------------------------*/
-static int __match_proto__(VSC_iter_f)
+static int v_matchproto_(VSC_iter_f)
do_json_cb(void *priv, const struct VSC_point * const pt)
{
uint64_t val;
@@ -152,7 +152,7 @@ struct once_priv {
int pad;
};
-static int __match_proto__(VSC_iter_f)
+static int v_matchproto_(VSC_iter_f)
do_once_cb_first(void *priv, const struct VSC_point * const pt)
{
struct once_priv *op;
@@ -169,7 +169,7 @@ do_once_cb_first(void *priv, const struct VSC_point * const pt)
return (1);
}
-static int __match_proto__(VSC_iter_f)
+static int v_matchproto_(VSC_iter_f)
do_once_cb(void *priv, const struct VSC_point * const pt)
{
struct once_priv *op;
@@ -210,7 +210,7 @@ do_once(struct vsm *vsm, struct vsc *vsc)
/*--------------------------------------------------------------------*/
-static int __match_proto__(VSC_iter_f)
+static int v_matchproto_(VSC_iter_f)
do_list_cb(void *priv, const struct VSC_point * const pt)
{
int i;
@@ -240,7 +240,7 @@ list_fields(struct vsm *vsm, struct vsc *vsc)
/*--------------------------------------------------------------------*/
-static void __attribute__((__noreturn__))
+static void v_noreturn_
usage(int status)
{
const char **opt;
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index 3f2b792..0dfacd1 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -928,7 +928,7 @@ handle_keypress(int ch)
redraw = 1;
}
-static void * __match_proto__(VSC_new_f)
+static void * v_matchproto_(VSC_new_f)
newpt(void *priv, const struct VSC_point *const vpt)
{
struct pt *pt;
@@ -958,7 +958,7 @@ newpt(void *priv, const struct VSC_point *const vpt)
return (pt);
}
-static void __match_proto__(VSC_destroy_f)
+static void v_matchproto_(VSC_destroy_f)
delpt(void *priv, const struct VSC_point *const vpt)
{
struct pt *pt;
diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h
index 996b199..52e12e5 100644
--- a/bin/varnishtest/vtc.h
+++ b/bin/varnishtest/vtc.h
@@ -35,9 +35,10 @@
#include <pthread_np.h>
#endif
+#include "vdef.h"
+
#include "miniobj.h"
#include "vas.h"
-#include "vdef.h"
#include "vqueue.h"
#include "vsb.h"
@@ -102,9 +103,9 @@ void vtc_loginit(char *buf, unsigned buflen);
struct vtclog *vtc_logopen(const char *id);
void vtc_logclose(struct vtclog *vl);
void vtc_log(struct vtclog *vl, int lvl, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void vtc_fatal(struct vtclog *vl, const char *, ...)
- __attribute__((__noreturn__)) __v_printflike(2,3);
+ v_noreturn_ v_printflike_(2,3);
void vtc_dump(struct vtclog *vl, int lvl, const char *pfx,
const char *str, int len);
void vtc_hexdump(struct vtclog *, int , const char *, const void *, int );
@@ -118,11 +119,11 @@ int exec_file(const char *fn, const char *script, const char *tmpdir,
void macro_undef(struct vtclog *vl, const char *instance, const char *name);
void macro_def(struct vtclog *vl, const char *instance, const char *name,
const char *fmt, ...)
- __v_printflike(4, 5);
+ v_printflike_(4, 5);
struct vsb *macro_expand(struct vtclog *vl, const char *text);
void extmacro_def(const char *name, const char *fmt, ...)
- __v_printflike(2, 3);
+ v_printflike_(2, 3);
struct http;
void cmd_stream(CMD_ARGS);
diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c
index 4515282..c4d4ad8 100644
--- a/bin/varnishtest/vtc_client.c
+++ b/bin/varnishtest/vtc_client.c
@@ -68,7 +68,7 @@ static VTAILQ_HEAD(, client) clients =
* Send the proxy header
*/
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
proxy_cb(void *priv, const struct suckaddr *sa)
{
struct suckaddr **addr = priv;
diff --git a/bin/varnishtest/vtc_h2_hpack.c b/bin/varnishtest/vtc_h2_hpack.c
index f986d2f..9e30bf8 100644
--- a/bin/varnishtest/vtc_h2_hpack.c
+++ b/bin/varnishtest/vtc_h2_hpack.c
@@ -30,7 +30,10 @@
#include <stdlib.h>
#include <string.h>
-#include <vas.h>
+
+#include "vdef.h"
+
+#include "vas.h"
#include "hpack.h"
#include "vtc_h2_priv.h"
diff --git a/bin/varnishtest/vtc_h2_tbl.c b/bin/varnishtest/vtc_h2_tbl.c
index cfb18b8..c0262af 100644
--- a/bin/varnishtest/vtc_h2_tbl.c
+++ b/bin/varnishtest/vtc_h2_tbl.c
@@ -31,7 +31,9 @@
#include <stdio.h>
#include <stdint.h>
-#include <vas.h>
+#include "vdef.h"
+
+#include "vas.h"
#include "hpack.h"
#include "vtc_h2_priv.h"
diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c
index a764d1f..72108b1 100644
--- a/bin/varnishtest/vtc_log.c
+++ b/bin/varnishtest/vtc_log.c
@@ -101,7 +101,7 @@ vtc_logclose(struct vtclog *vl)
FREE_OBJ(vl);
}
-static void __attribute__((__noreturn__))
+static void v_noreturn_
vtc_logfail(void)
{
@@ -267,7 +267,7 @@ vtc_hexdump(struct vtclog *vl, int lvl, const char *pfx,
/**********************************************************************/
-static void __attribute__((__noreturn__))
+static void v_noreturn_
vtc_log_VAS_Fail(const char *func, const char *file, int line,
const char *cond, enum vas_e why)
{
diff --git a/bin/varnishtest/vtc_logexp.c b/bin/varnishtest/vtc_logexp.c
index 7f7d054..5b983f1 100644
--- a/bin/varnishtest/vtc_logexp.c
+++ b/bin/varnishtest/vtc_logexp.c
@@ -252,7 +252,7 @@ logexp_next(struct logexp *le)
vtc_log(le->vl, 3, "expecting| %s", VSB_data(le->test->str));
}
-static int __match_proto__(VSLQ_dispatch_f)
+static int v_matchproto_(VSLQ_dispatch_f)
logexp_dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[],
void *priv)
{
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index 0d4982d..71ef165 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -432,7 +432,7 @@ i_mode(void)
* DNS services. This is a basic sanity check for those.
*/
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
dns_cb(void *priv, const struct suckaddr *sa)
{
char abuf[VTCP_ADDRBUFSIZE];
@@ -464,7 +464,7 @@ dns_works(void)
* Figure out what IP related magic
*/
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
bind_cb(void *priv, const struct suckaddr *sa)
{
(void)priv;
diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 8dfa516..332bc0e 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -46,13 +46,14 @@
#define VOPT_DEFINITION
#define VOPT_INC "varnishtop_options.h"
+#include "vdef.h"
+
#include "miniobj.h"
#include "vcurses.h"
#include "vapi/vsl.h"
#include "vapi/vsm.h"
#include "vapi/voptget.h"
#include "vas.h"
-#include "vdef.h"
#include "vtree.h"
#include "vut.h"
@@ -115,7 +116,7 @@ VRB_GENERATE_STATIC(t_order, top, e_order, cmp_order)
VRB_PROTOTYPE_STATIC(t_key, top, e_key, cmp_key)
VRB_GENERATE_STATIC(t_key, top, e_key, cmp_key)
-static int __match_proto__(VSLQ_dispatch_f)
+static int v_matchproto_(VSLQ_dispatch_f)
accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
void *priv)
{
@@ -181,7 +182,7 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
return (0);
}
-static int __match_proto__(VUT_cb_f)
+static int v_matchproto_(VUT_cb_f)
sighup(struct VUT *v)
{
assert(v == vut);
@@ -324,7 +325,7 @@ dump(void)
}
//lint -sem(usage, r_no)
-static void __attribute__((__noreturn__))
+static void v_noreturn_
usage(int status)
{
const char **opt;
diff --git a/include/Makefile.am b/include/Makefile.am
index 9fb1da1..5bec5a5 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -99,9 +99,13 @@ nobase_noinst_HEADERS = \
vtcp.h \
vtree.h
-vmod_abi.h: $(top_srcdir)/lib/libvcc/generate.py $(top_srcdir)/include/vrt.h
+vmod_abi.h: \
+ $(top_srcdir)/lib/libvcc/generate.py \
+ $(top_srcdir)/include/vdef.h \
+ $(top_srcdir)/include/vrt.h
mkdir -p tbl
- @PYTHON@ $(top_srcdir)/lib/libvcc/generate.py $(top_srcdir) $(top_builddir)
+ @PYTHON@ $(top_srcdir)/lib/libvcc/generate.py \
+ $(top_srcdir) $(top_builddir)
GEN_H = \
tbl/vrt_stv_var.h \
diff --git a/include/vas.h b/include/vas.h
index 76bcb75..11c0069 100644
--- a/include/vas.h
+++ b/include/vas.h
@@ -48,8 +48,8 @@ enum vas_e {
typedef void vas_f(const char *, const char *, int, const char *, enum vas_e);
-extern vas_f *VAS_Fail_Func __attribute__((__noreturn__));
-extern vas_f VAS_Fail __attribute__((__noreturn__));
+extern vas_f *VAS_Fail_Func v_noreturn_;
+extern vas_f VAS_Fail v_noreturn_;
#ifdef WITHOUT_ASSERTS
#define assert(e) ((void)(e))
diff --git a/include/vcli_serve.h b/include/vcli_serve.h
index 67a1792..7bc04c3 100644
--- a/include/vcli_serve.h
+++ b/include/vcli_serve.h
@@ -82,7 +82,7 @@ struct cli {
/* The implementation must provide these functions */
int VCLI_Overflow(struct cli *cli);
-void VCLI_Out(struct cli *cli, const char *fmt, ...) __v_printflike(2, 3);
+void VCLI_Out(struct cli *cli, const char *fmt, ...) v_printflike_(2, 3);
void VCLI_Quote(struct cli *cli, const char *str);
void VCLI_JSON_str(struct cli *cli, const char *str);
void VCLI_JSON_ver(struct cli *cli, unsigned ver, const char * const * av);
diff --git a/include/vdef.h b/include/vdef.h
index 4ab9e73..1852657 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -30,6 +30,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * Names of the form "v_[a-z_]*_" is reserved for this file.
+ *
+ * This file should always be the first non <...> include in a .c file.
*/
#ifdef VDEF_H_INCLUDED
@@ -71,13 +74,15 @@
#endif
#ifdef __printflike
-# define __v_printflike(f,a) __printflike(f,a)
+# define v_printflike_(f,a) __printflike(f,a)
#elif __GNUC_PREREQ__(2, 95) || defined(__INTEL_COMPILER)
-# define __v_printflike(f,a) __attribute__((format(printf, f, a)))
+# define v_printflike_(f,a) __attribute__((format(printf, f, a)))
#else
-# define __v_printflike(f,a)
+# define v_printflike_(f,a)
#endif
+#define v_noreturn_ __attribute__((__noreturn__))
+
/*********************************************************************
* Pointer alignment magic
*/
@@ -114,13 +119,13 @@
* even if that means not const'ing a const'able argument.
* The typedef should be specified as argument to the macro.
*/
-#define __match_proto__(xxx) /*lint --e{818} */
+#define v_matchproto_(xxx) /*lint --e{818} */
/*
* State variables may change value before we have considered the
* previous value
*/
-#define __state_variable__(varname) varname /*lint -esym(838,varname) */
+#define v_statevariable_(varname) varname /*lint -esym(838,varname) */
#ifdef __SUNPRO_C
#define NEEDLESS(s) {}
@@ -128,12 +133,10 @@
#define NEEDLESS(s) s
#endif
-#ifndef __unused
-# if __GNUC_PREREQ__(2, 7)
-# define __unused __attribute__((__unused__))
-# else
-# define __unused
-# endif
+#if __GNUC_PREREQ__(2, 7)
+# define v_unused_ __attribute__((__unused__))
+#else
+# define v_unused_
#endif
/*
@@ -160,5 +163,5 @@
# endif
# define __Static_assert(x, y) ___Static_assert(x, y)
# define ___Static_assert(x, y) \
- typedef char __assert_## y[(x) ? 1 : -1] __unused
+ typedef char __assert_## y[(x) ? 1 : -1] v_unused_
#endif
diff --git a/include/vrt.h b/include/vrt.h
index 76aae7e..fef0c9d 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -356,7 +356,7 @@ void VRT_hit_for_pass(VRT_CTX, VCL_DURATION);
void VRT_SetHdr(VRT_CTX, const struct gethdr_s *, const char *, ...);
void VRT_handling(VRT_CTX, unsigned hand);
-void VRT_fail(VRT_CTX, const char *fmt, ...) __v_printflike(2,3);
+void VRT_fail(VRT_CTX, const char *fmt, ...) v_printflike_(2,3);
void VRT_hashdata(VRT_CTX, const char *str, ...);
diff --git a/include/vsb.h b/include/vsb.h
index 3f66897..d510884 100644
--- a/include/vsb.h
+++ b/include/vsb.h
@@ -64,10 +64,10 @@ void VSB_clear(struct vsb *);
int VSB_bcat(struct vsb *, const void *, ssize_t);
int VSB_cat(struct vsb *, const char *);
int VSB_printf(struct vsb *, const char *, ...)
- __v_printflike(2, 3);
+ v_printflike_(2, 3);
#ifdef va_start
int VSB_vprintf(struct vsb *, const char *, va_list)
- __v_printflike(2, 0);
+ v_printflike_(2, 0);
#endif
int VSB_putc(struct vsb *, int);
int VSB_error(const struct vsb *);
diff --git a/include/vtree.h b/include/vtree.h
index 93323ab..649e822 100644
--- a/include/vtree.h
+++ b/include/vtree.h
@@ -379,7 +379,7 @@ struct { \
#define VRB_PROTOTYPE(name, type, field, cmp) \
VRB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
#define VRB_PROTOTYPE_STATIC(name, type, field, cmp) \
- VRB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
+ VRB_PROTOTYPE_INTERNAL(name, type, field, cmp, v_unused_ static)
#define VRB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
/*lint -esym(528, name##_VRB_*) */ \
attr void name##_VRB_INSERT_COLOR(struct name *, struct type *); \
@@ -399,7 +399,7 @@ attr struct type *name##_VRB_MINMAX(const struct name *, int); \
#define VRB_GENERATE(name, type, field, cmp) \
VRB_GENERATE_INTERNAL(name, type, field, cmp,)
#define VRB_GENERATE_STATIC(name, type, field, cmp) \
- VRB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
+ VRB_GENERATE_INTERNAL(name, type, field, cmp, v_unused_ static)
#define VRB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
attr void \
name##_VRB_INSERT_COLOR(struct name *head, struct type *elm) \
diff --git a/include/vut.h b/include/vut.h
index 0d731cf..9b8c25c 100644
--- a/include/vut.h
+++ b/include/vut.h
@@ -69,7 +69,7 @@ struct VUT {
};
void VUT_Error(struct VUT *, int status, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
int VUT_Arg(struct VUT *, int opt, const char *arg);
diff --git a/lib/libvarnish/binary_heap.c b/lib/libvarnish/binary_heap.c
index 322d412..d537c94 100644
--- a/lib/libvarnish/binary_heap.c
+++ b/lib/libvarnish/binary_heap.c
@@ -40,6 +40,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include "vdef.h"
#include "vas.h"
#include "binary_heap.h"
@@ -462,7 +463,6 @@ binheap_reorder(const struct binheap *bh, unsigned idx)
#include <stdio.h>
#include <string.h>
-#include "vdef.h"
#include "vrnd.h"
#include "miniobj.h"
@@ -482,7 +482,7 @@ struct foo {
struct foo *ff[N];
-static int __match_proto__(binheap_cmp_t)
+static int v_matchproto_(binheap_cmp_t)
cmp(void *priv, const void *a, const void *b)
{
const struct foo *fa, *fb;
@@ -493,7 +493,7 @@ cmp(void *priv, const void *a, const void *b)
return (fa->key < fb->key);
}
-static void __match_proto__(binheap_update_t)
+static void v_matchproto_(binheap_update_t)
update(void *priv, void *a, unsigned u)
{
struct foo *fa;
diff --git a/lib/libvarnish/vas.c b/lib/libvarnish/vas.c
index 3d7f631..8380df9 100644
--- a/lib/libvarnish/vas.c
+++ b/lib/libvarnish/vas.c
@@ -36,11 +36,13 @@
#include <stdlib.h>
#include <string.h>
+#include "vdef.h"
+
#include "vas.h"
-vas_f *VAS_Fail_Func __attribute__((__noreturn__));
+vas_f *VAS_Fail_Func v_noreturn_;
-void __attribute__((__noreturn__))
+void v_noreturn_
VAS_Fail(const char *func, const char *file, int line,
const char *cond, enum vas_e kind)
{
diff --git a/lib/libvarnish/vav.c b/lib/libvarnish/vav.c
index 4c4a779..f1bc3db 100644
--- a/lib/libvarnish/vav.c
+++ b/lib/libvarnish/vav.c
@@ -43,6 +43,8 @@
#include <stdlib.h>
#include <string.h>
+#include "vdef.h"
+
#include "vas.h"
#include "vav.h"
diff --git a/lib/libvarnish/vcli_proto.c b/lib/libvarnish/vcli_proto.c
index 3f0b165..789c08d 100644
--- a/lib/libvarnish/vcli_proto.c
+++ b/lib/libvarnish/vcli_proto.c
@@ -39,6 +39,8 @@
#include <string.h>
#include <unistd.h>
+#include "vdef.h"
+
#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "vcli.h"
#include "vsha256.h"
diff --git a/lib/libvarnish/vcli_serve.c b/lib/libvarnish/vcli_serve.c
index 33de8f3..689553d 100644
--- a/lib/libvarnish/vcli_serve.c
+++ b/lib/libvarnish/vcli_serve.c
@@ -79,7 +79,7 @@ struct VCLS {
/*--------------------------------------------------------------------*/
-void __match_proto__(cli_func_t)
+void v_matchproto_(cli_func_t)
VCLS_func_close(struct cli *cli, const char *const *av, void *priv)
{
@@ -91,7 +91,7 @@ VCLS_func_close(struct cli *cli, const char *const *av, void *priv)
/*--------------------------------------------------------------------*/
-void __match_proto__(cli_func_t)
+void v_matchproto_(cli_func_t)
VCLS_func_ping(struct cli *cli, const char * const *av, void *priv)
{
time_t t;
@@ -104,7 +104,7 @@ VCLS_func_ping(struct cli *cli, const char * const *av, void *priv)
/*--------------------------------------------------------------------*/
-void __match_proto__(cli_func_t)
+void v_matchproto_(cli_func_t)
VCLS_func_help(struct cli *cli, const char * const *av, void *priv)
{
struct cli_proto *clp;
@@ -149,7 +149,7 @@ VCLS_func_help(struct cli *cli, const char * const *av, void *priv)
}
}
-void __match_proto__(cli_func_t)
+void v_matchproto_(cli_func_t)
VCLS_func_help_json(struct cli *cli, const char * const *av, void *priv)
{
struct cli_proto *clp;
diff --git a/lib/libvarnish/vct.c b/lib/libvarnish/vct.c
index 087a9ca..8d36b10 100644
--- a/lib/libvarnish/vct.c
+++ b/lib/libvarnish/vct.c
@@ -34,6 +34,8 @@
#include <stdint.h>
#include <string.h>
+#include "vdef.h"
+
#include "vas.h"
#include "vct.h"
diff --git a/lib/libvarnish/vev.c b/lib/libvarnish/vev.c
index d04a80f..ac69754 100644
--- a/lib/libvarnish/vev.c
+++ b/lib/libvarnish/vev.c
@@ -92,7 +92,7 @@ struct vev_root {
/*--------------------------------------------------------------------*/
-static void __match_proto__(binheap_update_t)
+static void v_matchproto_(binheap_update_t)
vev_bh_update(void *priv, void *a, unsigned u)
{
struct vev_root *evb;
@@ -110,7 +110,7 @@ vev_bh_update(void *priv, void *a, unsigned u)
}
}
-static int __match_proto__(binheap_cmp_t)
+static int v_matchproto_(binheap_cmp_t)
vev_bh_cmp(void *priv, const void *a, const void *b)
{
struct vev_root *evb;
diff --git a/lib/libvarnish/vin.c b/lib/libvarnish/vin.c
index 5a3d948..6dac9d2 100644
--- a/lib/libvarnish/vin.c
+++ b/lib/libvarnish/vin.c
@@ -38,8 +38,9 @@
#include <string.h>
#include <unistd.h>
-#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "vdef.h"
+
+#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "vin.h"
int
diff --git a/lib/libvarnish/vlu.c b/lib/libvarnish/vlu.c
index a636804..2ae654e 100644
--- a/lib/libvarnish/vlu.c
+++ b/lib/libvarnish/vlu.c
@@ -34,6 +34,8 @@
#include <string.h>
#include <unistd.h>
+#include "vdef.h"
+
#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "miniobj.h"
diff --git a/lib/libvarnish/vnum.c b/lib/libvarnish/vnum.c
index 14ba022..6caf931 100644
--- a/lib/libvarnish/vnum.c
+++ b/lib/libvarnish/vnum.c
@@ -36,6 +36,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include "vdef.h"
+
#include "vnum.h"
#include "vas.h"
diff --git a/lib/libvarnish/vpf.c b/lib/libvarnish/vpf.c
index 3da5748..5626b9e 100644
--- a/lib/libvarnish/vpf.c
+++ b/lib/libvarnish/vpf.c
@@ -40,6 +40,8 @@
#include <string.h>
#include <unistd.h>
+#include "vdef.h"
+
#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "vfl.h"
#include "vpf.h"
diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c
index 61469d1..42047aa 100644
--- a/lib/libvarnish/vre.c
+++ b/lib/libvarnish/vre.c
@@ -31,6 +31,8 @@
#include <pcre.h>
#include <string.h>
+#include "vdef.h"
+
#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "miniobj.h"
diff --git a/lib/libvarnish/vrnd.c b/lib/libvarnish/vrnd.c
index e38f0a7..3dc8b18 100644
--- a/lib/libvarnish/vrnd.c
+++ b/lib/libvarnish/vrnd.c
@@ -40,8 +40,9 @@
#include <string.h>
#include <unistd.h>
-#include "vas.h"
#include "vdef.h"
+
+#include "vas.h"
#include "vrnd.h"
/**********************************************************************
diff --git a/lib/libvarnish/vsha256.c b/lib/libvarnish/vsha256.c
index 7836179..73efb0b 100644
--- a/lib/libvarnish/vsha256.c
+++ b/lib/libvarnish/vsha256.c
@@ -43,6 +43,8 @@
#include <stdint.h>
#include <string.h>
+#include "vdef.h"
+
#include "vas.h"
#include "vend.h"
#include "vsha256.h"
diff --git a/lib/libvarnish/vss.c b/lib/libvarnish/vss.c
index 1f8af2a..29c66be 100644
--- a/lib/libvarnish/vss.c
+++ b/lib/libvarnish/vss.c
@@ -36,6 +36,8 @@
#include <stdlib.h>
#include <string.h>
+#include "vdef.h"
+
#include "vas.h"
#include "vsa.h"
#include "vss.h"
diff --git a/lib/libvarnish/vsub.c b/lib/libvarnish/vsub.c
index 48f56d7..2792ebc 100644
--- a/lib/libvarnish/vsub.c
+++ b/lib/libvarnish/vsub.c
@@ -39,8 +39,9 @@
#include <string.h>
#include <unistd.h>
-#include "vas.h"
#include "vdef.h"
+
+#include "vas.h"
#include "vfil.h"
#include "vlu.h"
#include "vsb.h"
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 2a4c25f..fb320ce 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -369,7 +369,7 @@ VTCP_set_read_timeout(int s, double seconds)
/*--------------------------------------------------------------------
*/
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
vtcp_open_callback(void *priv, const struct suckaddr *sa)
{
double *p = priv;
@@ -491,7 +491,7 @@ struct helper {
const char **errp;
};
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
vtcp_lo_cb(void *priv, const struct suckaddr *sa)
{
int sock;
diff --git a/lib/libvarnish/vtim.c b/lib/libvarnish/vtim.c
index b2d47dd..4ef9058 100644
--- a/lib/libvarnish/vtim.c
+++ b/lib/libvarnish/vtim.c
@@ -65,6 +65,8 @@
#include <mach/mach_time.h>
#endif
+#include "vdef.h"
+
#include "vas.h"
#include "vtim.h"
diff --git a/lib/libvarnishapi/vjsn.c b/lib/libvarnishapi/vjsn.c
index c189a68..1859673 100644
--- a/lib/libvarnishapi/vjsn.c
+++ b/lib/libvarnishapi/vjsn.c
@@ -36,6 +36,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include "vdef.h"
+
#include "vas.h"
#include "miniobj.h"
#include "vqueue.h"
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index 361a2bf..a028423 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -317,7 +317,7 @@ VSL_PrintAll(struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
}
}
-int __match_proto__(VSLQ_dispatch_f)
+int v_matchproto_(VSLQ_dispatch_f)
VSL_PrintTransactions(struct VSL_data *vsl, struct VSL_transaction * const pt[],
void *fo)
{
@@ -456,7 +456,7 @@ VSL_WriteAll(struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
}
}
-int __match_proto__(VSLQ_dispatch_f)
+int v_matchproto_(VSLQ_dispatch_f)
VSL_WriteTransactions(struct VSL_data *vsl, struct VSL_transaction * const pt[],
void *fo)
{
diff --git a/lib/libvarnishapi/vsl_api.h b/lib/libvarnishapi/vsl_api.h
index 8aef719..95e4ace 100644
--- a/lib/libvarnishapi/vsl_api.h
+++ b/lib/libvarnishapi/vsl_api.h
@@ -32,7 +32,7 @@
#define VSL_FILE_ID "VSL"
/*lint -esym(534, vsl_diag) */
-int vsl_diag(struct VSL_data *vsl, const char *fmt, ...) __v_printflike(2, 3);
+int vsl_diag(struct VSL_data *vsl, const char *fmt, ...) v_printflike_(2, 3);
void vsl_vbm_bitset(int bit, void *priv);
void vsl_vbm_bitclr(int bit, void *priv);
diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c
index cd7c2b4..5d69798 100644
--- a/lib/libvarnishapi/vsl_arg.c
+++ b/lib/libvarnishapi/vsl_arg.c
@@ -203,14 +203,14 @@ VSLQ_Name2Grouping(const char *name, int l)
return (n);
}
-void __match_proto__(VSL_tagfind_f)
+void v_matchproto_(VSL_tagfind_f)
vsl_vbm_bitset(int bit, void *priv)
{
vbit_set((struct vbitmap *)priv, bit);
}
-void __match_proto__(VSL_tagfind_f)
+void v_matchproto_(VSL_tagfind_f)
vsl_vbm_bitclr(int bit, void *priv)
{
diff --git a/lib/libvarnishapi/vut.c b/lib/libvarnishapi/vut.c
index 4245db9..f4053f6 100644
--- a/lib/libvarnishapi/vut.c
+++ b/lib/libvarnishapi/vut.c
@@ -80,7 +80,7 @@ vut_vpf_remove(void)
}
}
-static int __match_proto__(VSLQ_dispatch_f)
+static int v_matchproto_(VSLQ_dispatch_f)
vut_dispatch(struct VSL_data *vsl, struct VSL_transaction * const trans[],
void *priv)
{
@@ -101,7 +101,7 @@ vut_dispatch(struct VSL_data *vsl, struct VSL_transaction * const trans[],
}
//lint -sem(vut_error, r_no)
-static void __attribute__((__noreturn__)) __match_proto__(VUT_error_f)
+static void v_noreturn_ v_matchproto_(VUT_error_f)
vut_error(struct VUT *vut, int status, const char *fmt, va_list ap)
{
diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c
index 1c80487..374c886 100644
--- a/lib/libvcc/vcc_acl.c
+++ b/lib/libvcc/vcc_acl.c
@@ -358,7 +358,7 @@ vcc_acl_emit(struct vcc *tl, const char *name, const char *rname, int anon)
VCC_PrintCName(func, name, NULL);
AZ(VSB_finish(func));
- Fh(tl, 0, "\nstatic int __match_proto__(acl_match_f)\n");
+ Fh(tl, 0, "\nstatic int v_matchproto_(acl_match_f)\n");
Fh(tl, 0, "%s(VRT_CTX, const VCL_IP p)\n", VSB_data(func));
Fh(tl, 0, "{\n");
Fh(tl, 0, "\tconst unsigned char *a;\n");
diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index fcf1665..e07ee9b 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -71,7 +71,7 @@ struct method method_tab[] = {
/*--------------------------------------------------------------------*/
-void * __match_proto__(TlAlloc)
+void * v_matchproto_(TlAlloc)
TlAlloc(struct vcc *tl, unsigned len)
{
void *p;
@@ -628,10 +628,10 @@ vcc_CompileSource(struct vcc *tl, struct source *sp)
Fh(tl, 1, "\n");
for (i = 1; i < VCL_MET_MAX; i++) {
Fh(tl, 1,
- "void __match_proto__(vcl_func_f) "
+ "void v_matchproto_(vcl_func_f) "
"VGC_function_%s(VRT_CTX);\n",
method_tab[i].name);
- Fc(tl, 1, "\nvoid __match_proto__(vcl_func_f)\n");
+ Fc(tl, 1, "\nvoid v_matchproto_(vcl_func_f)\n");
Fc(tl, 1,
"VGC_function_%s(VRT_CTX)\n",
method_tab[i].name);
diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h
index 600bcb5..47e3033 100644
--- a/lib/libvcc/vcc_compile.h
+++ b/lib/libvcc/vcc_compile.h
@@ -255,11 +255,11 @@ struct inifin *New_IniFin(struct vcc *tl);
* F -> Finish function
*/
void Fh(const struct vcc *tl, int indent, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void Fc(const struct vcc *tl, int indent, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void Fb(const struct vcc *tl, int indent, const char *fmt, ...)
- __v_printflike(3, 4);
+ v_printflike_(3, 4);
void EncToken(struct vsb *sb, const struct token *t);
int IsMethod(const struct token *t);
void *TlAlloc(struct vcc *tl, unsigned len);
diff --git a/lib/libvcc/vcc_expr.c b/lib/libvcc/vcc_expr.c
index bbe3a16..a36932f 100644
--- a/lib/libvcc/vcc_expr.c
+++ b/lib/libvcc/vcc_expr.c
@@ -234,7 +234,7 @@ vcc_new_expr(void)
static struct expr *
vcc_mk_expr(vcc_type_t fmt, const char *str, ...)
- __v_printflike(2, 3);
+ v_printflike_(2, 3);
static struct expr *
vcc_mk_expr(vcc_type_t fmt, const char *str, ...)
@@ -408,7 +408,7 @@ vcc_expr_tostring(struct vcc *tl, struct expr **e, vcc_type_t fmt)
/*--------------------------------------------------------------------
*/
-static void __match_proto__(sym_expr_t)
+static void v_matchproto_(sym_expr_t)
vcc_Eval_Regsub(struct vcc *tl, struct expr **e, const struct symbol *sym,
vcc_type_t fmt)
{
@@ -445,7 +445,7 @@ vcc_Eval_Regsub(struct vcc *tl, struct expr **e, const struct symbol *sym,
/*--------------------------------------------------------------------
*/
-static void __match_proto__(sym_expr_t)
+static void v_matchproto_(sym_expr_t)
vcc_Eval_BoolConst(struct vcc *tl, struct expr **e, const struct symbol *sym,
vcc_type_t fmt)
{
@@ -459,7 +459,7 @@ vcc_Eval_BoolConst(struct vcc *tl, struct expr **e, const struct symbol *sym,
/*--------------------------------------------------------------------
*/
-void __match_proto__(sym_expr_t)
+void v_matchproto_(sym_expr_t)
vcc_Eval_Handle(struct vcc *tl, struct expr **e, const struct symbol *sym,
vcc_type_t fmt)
{
@@ -481,7 +481,7 @@ vcc_Eval_Handle(struct vcc *tl, struct expr **e, const struct symbol *sym,
/*--------------------------------------------------------------------
*/
-void __match_proto__(sym_expr_t)
+void v_matchproto_(sym_expr_t)
vcc_Eval_Var(struct vcc *tl, struct expr **e, const struct symbol *sym,
vcc_type_t fmt)
{
@@ -723,7 +723,7 @@ vcc_Eval_Func(struct vcc *tl, const char *spec,
/*--------------------------------------------------------------------
*/
-void __match_proto__(sym_expr_t)
+void v_matchproto_(sym_expr_t)
vcc_Eval_SymFunc(struct vcc *tl, struct expr **e, const struct symbol *sym,
vcc_type_t fmt)
{
diff --git a/lib/libvcc/vcc_parse.c b/lib/libvcc/vcc_parse.c
index 722574d..2466431 100644
--- a/lib/libvcc/vcc_parse.c
+++ b/lib/libvcc/vcc_parse.c
@@ -248,7 +248,7 @@ vcc_ParseFunction(struct vcc *tl)
}
tl->curproc = vcc_AddProc(tl, tl->t);
Fh(tl, 0, "void %s(VRT_CTX);\n", sym->rname);
- Fc(tl, 1, "\nvoid __match_proto__(vcl_func_t)\n");
+ Fc(tl, 1, "\nvoid v_matchproto_(vcl_func_t)\n");
Fc(tl, 1, "%s(VRT_CTX)\n", sym->rname);
}
vcc_NextToken(tl);
diff --git a/lib/libvcc/vcc_utils.c b/lib/libvcc/vcc_utils.c
index fe9f4fb..9db35bb 100644
--- a/lib/libvcc/vcc_utils.c
+++ b/lib/libvcc/vcc_utils.c
@@ -147,7 +147,7 @@ struct rss {
int wrong;
};
-static int __match_proto__(vss_resolved_f)
+static int v_matchproto_(vss_resolved_f)
rs_callback(void *priv, const struct suckaddr *vsa)
{
struct rss *rss;
diff --git a/lib/libvcc/vcc_var.c b/lib/libvcc/vcc_var.c
index ea69923..4058b4d 100644
--- a/lib/libvcc/vcc_var.c
+++ b/lib/libvcc/vcc_var.c
@@ -36,7 +36,7 @@
/*--------------------------------------------------------------------*/
-void __match_proto__(sym_wildcard_t)
+void v_matchproto_(sym_wildcard_t)
vcc_Var_Wildcard(struct vcc *tl, struct symbol *parent,
const char *b, const char *e)
{
diff --git a/lib/libvcc/vcc_xref.c b/lib/libvcc/vcc_xref.c
index 7a78db3..267c949 100644
--- a/lib/libvcc/vcc_xref.c
+++ b/lib/libvcc/vcc_xref.c
@@ -403,7 +403,7 @@ vcc_pnam(struct vcc *tl, const struct symbol *sym)
Fc(tl, 0, "%s", sym->name);
}
-static void __match_proto__(symwalk_f)
+static void v_matchproto_(symwalk_f)
vcc_xreftable(struct vcc *tl, const struct symbol *sym)
{
diff --git a/lib/libvmod_blob/vmod_blob.c b/lib/libvmod_blob/vmod_blob.c
index 8beb982..a509b34 100644
--- a/lib/libvmod_blob/vmod_blob.c
+++ b/lib/libvmod_blob/vmod_blob.c
@@ -192,7 +192,7 @@ check_enc_case(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, enum encoding enc,
/* Objects */
-VCL_VOID __match_proto__(td_blob_blob__init)
+VCL_VOID v_matchproto_(td_blob_blob__init)
vmod_blob__init(VRT_CTX, struct vmod_blob_blob **blobp, const char *vcl_name,
VCL_ENUM decs, const char *p, ...)
{
@@ -251,7 +251,7 @@ vmod_blob__init(VRT_CTX, struct vmod_blob_blob **blobp, const char *vcl_name,
b->blob.len = len;
}
-VCL_BLOB __match_proto__(td_blob_blob_get)
+VCL_BLOB v_matchproto_(td_blob_blob_get)
vmod_blob_get(VRT_CTX, struct vmod_blob_blob *b)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -259,7 +259,7 @@ vmod_blob_get(VRT_CTX, struct vmod_blob_blob *b)
return &b->blob;
}
-VCL_STRING __match_proto__(td_blob_blob_encode)
+VCL_STRING v_matchproto_(td_blob_blob_encode)
vmod_blob_encode(VRT_CTX, struct vmod_blob_blob *b, VCL_ENUM encs,
VCL_ENUM case_s)
{
@@ -311,7 +311,7 @@ vmod_blob_encode(VRT_CTX, struct vmod_blob_blob *b, VCL_ENUM encs,
return b->encoding[enc][kase];
}
-VCL_VOID __match_proto__(td_blob_blob__fini)
+VCL_VOID v_matchproto_(td_blob_blob__fini)
vmod_blob__fini(struct vmod_blob_blob **blobp)
{
struct vmod_blob_blob *b;
@@ -360,7 +360,7 @@ find_nonempty_va(const char *restrict *p, va_list ap)
return (q);
}
-VCL_BLOB __match_proto__(td_blob_decode)
+VCL_BLOB v_matchproto_(td_blob_decode)
vmod_decode(VRT_CTX, VCL_ENUM decs, VCL_INT length, const char *p, ...)
{
enum encoding dec = parse_encoding(decs);
@@ -447,7 +447,7 @@ encode(VRT_CTX, enum encoding enc, enum case_e kase, VCL_BLOB b)
return wb_finish(&wb, NULL);
}
-VCL_STRING __match_proto__(td_blob_encode)
+VCL_STRING v_matchproto_(td_blob_encode)
vmod_encode(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, VCL_BLOB b)
{
enum encoding enc = parse_encoding(encs);
@@ -459,7 +459,7 @@ vmod_encode(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, VCL_BLOB b)
return encode(ctx, enc, kase, b);
}
-VCL_STRING __match_proto__(td_blob_transcode)
+VCL_STRING v_matchproto_(td_blob_transcode)
vmod_transcode(VRT_CTX, VCL_ENUM decs, VCL_ENUM encs, VCL_ENUM case_s,
VCL_INT length, const char *p, ...)
{
@@ -533,7 +533,7 @@ vmod_transcode(VRT_CTX, VCL_ENUM decs, VCL_ENUM encs, VCL_ENUM case_s,
return (r);
}
-VCL_BOOL __match_proto__(td_blob_same)
+VCL_BOOL v_matchproto_(td_blob_same)
vmod_same(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
{
(void) ctx;
@@ -545,7 +545,7 @@ vmod_same(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
return (b1->len == b2->len && b1->priv == b2->priv);
}
-VCL_BOOL __match_proto__(td_blob_equal)
+VCL_BOOL v_matchproto_(td_blob_equal)
vmod_equal(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
{
(void) ctx;
@@ -563,7 +563,7 @@ vmod_equal(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
return (memcmp(b1->priv, b2->priv, b1->len) == 0);
}
-VCL_INT __match_proto__(td_blob_length)
+VCL_INT v_matchproto_(td_blob_length)
vmod_length(VRT_CTX, VCL_BLOB b)
{
(void) ctx;
@@ -573,7 +573,7 @@ vmod_length(VRT_CTX, VCL_BLOB b)
return b->len;
}
-VCL_BLOB __match_proto__(td_blob_sub)
+VCL_BLOB v_matchproto_(td_blob_sub)
vmod_sub(VRT_CTX, VCL_BLOB b, VCL_BYTES n, VCL_BYTES off)
{
uintptr_t snap;
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 3493578..f094fc9 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -68,7 +68,7 @@ static VCL_DURATION vcl_release_delay = 0.0;
static pthread_mutex_t vsc_mtx = PTHREAD_MUTEX_INITIALIZER;
static struct VSC_debug *vsc;
-VCL_VOID __match_proto__(td_debug_panic)
+VCL_VOID v_matchproto_(td_debug_panic)
xyzzy_panic(VRT_CTX, const char *str, ...)
{
va_list ap;
@@ -82,7 +82,7 @@ xyzzy_panic(VRT_CTX, const char *str, ...)
VAS_Fail("VCL", "", 0, b, VAS_VCL);
}
-VCL_STRING __match_proto__(td_debug_author)
+VCL_STRING v_matchproto_(td_debug_author)
xyzzy_author(VRT_CTX, VCL_ENUM person, VCL_ENUM someone)
{
(void)someone;
@@ -99,7 +99,7 @@ xyzzy_author(VRT_CTX, VCL_ENUM person, VCL_ENUM someone)
WRONG("Illegal VMOD enum");
}
-VCL_VOID __match_proto__(td_debug_test_priv_call)
+VCL_VOID v_matchproto_(td_debug_test_priv_call)
xyzzy_test_priv_call(VRT_CTX, struct vmod_priv *priv)
{
@@ -112,7 +112,7 @@ xyzzy_test_priv_call(VRT_CTX, struct vmod_priv *priv)
}
}
-VCL_STRING __match_proto__(td_debug_test_priv_task)
+VCL_STRING v_matchproto_(td_debug_test_priv_task)
xyzzy_test_priv_task(VRT_CTX, struct vmod_priv *priv, VCL_STRING s)
{
@@ -134,7 +134,7 @@ xyzzy_test_priv_task(VRT_CTX, struct vmod_priv *priv, VCL_STRING s)
return (priv->priv);
}
-VCL_STRING __match_proto__(td_debug_test_priv_top)
+VCL_STRING v_matchproto_(td_debug_test_priv_top)
xyzzy_test_priv_top(VRT_CTX, struct vmod_priv *priv, VCL_STRING s)
{
@@ -146,7 +146,7 @@ xyzzy_test_priv_top(VRT_CTX, struct vmod_priv *priv, VCL_STRING s)
return (priv->priv);
}
-VCL_VOID __match_proto__(td_debug_test_priv_vcl)
+VCL_VOID v_matchproto_(td_debug_test_priv_vcl)
xyzzy_test_priv_vcl(VRT_CTX, struct vmod_priv *priv)
{
struct priv_vcl *priv_vcl;
@@ -167,7 +167,7 @@ xyzzy_no_backend(VRT_CTX)
return (NULL);
}
-VCL_STEVEDORE __match_proto__(td_debug_no_stevedore)
+VCL_STEVEDORE v_matchproto_(td_debug_no_stevedore)
xyzzy_no_stevedore(VRT_CTX)
{
@@ -176,7 +176,7 @@ xyzzy_no_stevedore(VRT_CTX)
return (NULL);
}
-VCL_VOID __match_proto__(td_debug_rot52)
+VCL_VOID v_matchproto_(td_debug_rot52)
xyzzy_rot52(VRT_CTX, VCL_HTTP hp)
{
@@ -186,7 +186,7 @@ xyzzy_rot52(VRT_CTX, VCL_HTTP hp)
http_PrintfHeader(hp, "Encrypted: ROT52");
}
-VCL_STRING __match_proto__(td_debug_argtest)
+VCL_STRING v_matchproto_(td_debug_argtest)
xyzzy_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
VCL_STRING comma, VCL_INT four)
{
@@ -196,14 +196,14 @@ xyzzy_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
return (WS_Copy(ctx->ws, buf, -1));
}
-VCL_INT __match_proto__(td_debug_vre_limit)
+VCL_INT v_matchproto_(td_debug_vre_limit)
xyzzy_vre_limit(VRT_CTX)
{
(void)ctx;
return (cache_param->vre_limits.match);
}
-static void __match_proto__(obj_event_f)
+static void v_matchproto_(obj_event_f)
obj_cb(struct worker *wrk, void *priv, struct objcore *oc, unsigned event)
{
const struct priv_vcl *priv_vcl;
@@ -223,7 +223,7 @@ obj_cb(struct worker *wrk, void *priv, struct objcore *oc, unsigned event)
(intmax_t)(uintptr_t)oc);
}
-VCL_VOID __match_proto__(td_debug_register_obj_events)
+VCL_VOID v_matchproto_(td_debug_register_obj_events)
xyzzy_register_obj_events(VRT_CTX, struct vmod_priv *priv)
{
struct priv_vcl *priv_vcl;
@@ -236,14 +236,14 @@ xyzzy_register_obj_events(VRT_CTX, struct vmod_priv *priv)
VSL(SLT_Debug, 0, "Subscribed to Object Events");
}
-VCL_VOID __match_proto__(td_debug_fail)
+VCL_VOID v_matchproto_(td_debug_fail)
xyzzy_fail(VRT_CTX)
{
VRT_fail(ctx, "Forced failure");
}
-static void __match_proto__(vmod_priv_free_f)
+static void v_matchproto_(vmod_priv_free_f)
priv_vcl_free(void *priv)
{
struct priv_vcl *priv_vcl;
@@ -347,7 +347,7 @@ event_cold(VRT_CTX, const struct vmod_priv *priv)
return (0);
}
-int __match_proto__(vmod_event_f)
+int v_matchproto_(vmod_event_f)
event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
@@ -363,7 +363,7 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
}
}
-VCL_VOID __match_proto__(td_debug_sleep)
+VCL_VOID v_matchproto_(td_debug_sleep)
xyzzy_sleep(VRT_CTX, VCL_DURATION t)
{
@@ -486,7 +486,7 @@ xyzzy_workspace_overflow(VRT_CTX, VCL_ENUM which)
WS_MarkOverflow(ws);
}
-VCL_VOID __match_proto__(td_debug_vcl_release_delay)
+VCL_VOID v_matchproto_(td_debug_vcl_release_delay)
xyzzy_vcl_release_delay(VRT_CTX, VCL_DURATION delay)
{
@@ -495,7 +495,7 @@ xyzzy_vcl_release_delay(VRT_CTX, VCL_DURATION delay)
vcl_release_delay = delay;
}
-VCL_BOOL __match_proto__(td_debug_match_acl)
+VCL_BOOL v_matchproto_(td_debug_match_acl)
xyzzy_match_acl(VRT_CTX, VCL_ACL acl, VCL_IP ip)
{
@@ -539,7 +539,7 @@ xyzzy_barrier_sync(VRT_CTX, VCL_STRING addr)
return (0);
}
-VCL_VOID __match_proto__(td_debug_test_probe)
+VCL_VOID v_matchproto_(td_debug_test_probe)
xyzzy_test_probe(VRT_CTX, VCL_PROBE probe, VCL_PROBE same)
{
diff --git a/lib/libvmod_debug/vmod_debug_dyn.c b/lib/libvmod_debug/vmod_debug_dyn.c
index ad2dd29..ebd7330 100644
--- a/lib/libvmod_debug/vmod_debug_dyn.c
+++ b/lib/libvmod_debug/vmod_debug_dyn.c
@@ -150,7 +150,7 @@ xyzzy_dyn__fini(struct xyzzy_debug_dyn **dynp)
*dynp = NULL;
}
-VCL_BACKEND __match_proto__()
+VCL_BACKEND v_matchproto_()
xyzzy_dyn_backend(VRT_CTX, struct xyzzy_debug_dyn *dyn)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
diff --git a/lib/libvmod_debug/vmod_debug_obj.c b/lib/libvmod_debug/vmod_debug_obj.c
index 63f2e44..f053601 100644
--- a/lib/libvmod_debug/vmod_debug_obj.c
+++ b/lib/libvmod_debug/vmod_debug_obj.c
@@ -71,7 +71,7 @@ xyzzy_obj__fini(struct xyzzy_debug_obj **op)
*op = NULL;
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
xyzzy_obj_enum(VRT_CTX, struct xyzzy_debug_obj *o, VCL_ENUM e)
{
@@ -80,7 +80,7 @@ xyzzy_obj_enum(VRT_CTX, struct xyzzy_debug_obj *o, VCL_ENUM e)
assert(!strcmp(e, "martin"));
}
-VCL_STRING __match_proto__()
+VCL_STRING v_matchproto_()
xyzzy_obj_foo(VRT_CTX, struct xyzzy_debug_obj *o, VCL_STRING s)
{
@@ -91,7 +91,7 @@ xyzzy_obj_foo(VRT_CTX, struct xyzzy_debug_obj *o, VCL_STRING s)
return ("BOO");
}
-VCL_TIME __match_proto__()
+VCL_TIME v_matchproto_()
xyzzy_obj_date(VRT_CTX, struct xyzzy_debug_obj *o)
{
@@ -101,7 +101,7 @@ xyzzy_obj_date(VRT_CTX, struct xyzzy_debug_obj *o)
return (21.4);
}
-VCL_STRING __match_proto__()
+VCL_STRING v_matchproto_()
xyzzy_obj_string(VRT_CTX, struct xyzzy_debug_obj *o)
{
@@ -111,7 +111,7 @@ xyzzy_obj_string(VRT_CTX, struct xyzzy_debug_obj *o)
return (o->string);
}
-VCL_STRING __match_proto__()
+VCL_STRING v_matchproto_()
xyzzy_obj_number(VRT_CTX, struct xyzzy_debug_obj *o)
{
@@ -121,28 +121,28 @@ xyzzy_obj_number(VRT_CTX, struct xyzzy_debug_obj *o)
return (o->number);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
xyzzy_obj_test_priv_call(VRT_CTX,
struct xyzzy_debug_obj *o, struct vmod_priv *priv)
{
(void)o;
xyzzy_test_priv_call(ctx, priv);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
xyzzy_obj_test_priv_vcl(VRT_CTX,
struct xyzzy_debug_obj *o, struct vmod_priv *priv)
{
(void)o;
xyzzy_test_priv_vcl(ctx, priv);
}
-VCL_STRING __match_proto__()
+VCL_STRING v_matchproto_()
xyzzy_obj_test_priv_task(VRT_CTX,
struct xyzzy_debug_obj *o, struct vmod_priv *priv, VCL_STRING s)
{
(void)o;
return (xyzzy_test_priv_task(ctx, priv, s));
}
-VCL_STRING __match_proto__()
+VCL_STRING v_matchproto_()
xyzzy_obj_test_priv_top(VRT_CTX,
struct xyzzy_debug_obj *o, struct vmod_priv *priv, VCL_STRING s)
{
diff --git a/lib/libvmod_directors/fall_back.c b/lib/libvmod_directors/fall_back.c
index 1f32615..202431e 100644
--- a/lib/libvmod_directors/fall_back.c
+++ b/lib/libvmod_directors/fall_back.c
@@ -46,7 +46,7 @@ struct vmod_directors_fallback {
unsigned cur;
};
-static unsigned __match_proto__(vdi_healthy)
+static unsigned v_matchproto_(vdi_healthy)
vmod_fallback_healthy(const struct director *dir, const struct busyobj *bo,
double *changed)
{
@@ -56,7 +56,7 @@ vmod_fallback_healthy(const struct director *dir, const struct busyobj *bo,
return (vdir_any_healthy(fb->vd, bo, changed));
}
-static const struct director * __match_proto__(vdi_resolve_f)
+static const struct director * v_matchproto_(vdi_resolve_f)
vmod_fallback_resolve(const struct director *dir, struct worker *wrk,
struct busyobj *bo)
{
@@ -86,7 +86,7 @@ vmod_fallback_resolve(const struct director *dir, struct worker *wrk,
return (be);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_fallback__init(VRT_CTX,
struct vmod_directors_fallback **fbp, const char *vcl_name, VCL_BOOL sticky)
{
@@ -103,7 +103,7 @@ vmod_fallback__init(VRT_CTX,
fb->st = sticky;
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_fallback__fini(struct vmod_directors_fallback **fbp)
{
struct vmod_directors_fallback *fb;
@@ -115,7 +115,7 @@ vmod_fallback__fini(struct vmod_directors_fallback **fbp)
FREE_OBJ(fb);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_fallback_add_backend(VRT_CTX,
struct vmod_directors_fallback *fb, VCL_BACKEND be)
{
@@ -125,7 +125,7 @@ vmod_fallback_add_backend(VRT_CTX,
vdir_add_backend(ctx, fb->vd, be, 0.0);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_fallback_remove_backend(VRT_CTX,
struct vmod_directors_fallback *fb, VCL_BACKEND be)
{
@@ -134,7 +134,7 @@ vmod_fallback_remove_backend(VRT_CTX,
vdir_remove_backend(ctx, fb->vd, be, &fb->cur);
}
-VCL_BACKEND __match_proto__()
+VCL_BACKEND v_matchproto_()
vmod_fallback_backend(VRT_CTX,
struct vmod_directors_fallback *fb)
{
diff --git a/lib/libvmod_directors/hash.c b/lib/libvmod_directors/hash.c
index 5e5fc97..80a792e 100644
--- a/lib/libvmod_directors/hash.c
+++ b/lib/libvmod_directors/hash.c
@@ -47,7 +47,7 @@ struct vmod_directors_hash {
struct vdir *vd;
};
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_hash__init(VRT_CTX, struct vmod_directors_hash **rrp,
const char *vcl_name)
{
@@ -62,7 +62,7 @@ vmod_hash__init(VRT_CTX, struct vmod_directors_hash **rrp,
vdir_new(&rr->vd, "hash", vcl_name, NULL, NULL, rr);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_hash__fini(struct vmod_directors_hash **rrp)
{
struct vmod_directors_hash *rr;
@@ -74,7 +74,7 @@ vmod_hash__fini(struct vmod_directors_hash **rrp)
FREE_OBJ(rr);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_hash_add_backend(VRT_CTX,
struct vmod_directors_hash *rr, VCL_BACKEND be, double w)
{
@@ -84,7 +84,7 @@ vmod_hash_add_backend(VRT_CTX,
vdir_add_backend(ctx, rr->vd, be, w);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_hash_remove_backend(VRT_CTX,
struct vmod_directors_hash *rr, VCL_BACKEND be)
{
@@ -94,7 +94,7 @@ vmod_hash_remove_backend(VRT_CTX,
vdir_remove_backend(ctx, rr->vd, be, NULL);
}
-VCL_BACKEND __match_proto__()
+VCL_BACKEND v_matchproto_()
vmod_hash_backend(VRT_CTX, struct vmod_directors_hash *rr,
const char *arg, ...)
{
diff --git a/lib/libvmod_directors/random.c b/lib/libvmod_directors/random.c
index b2924db..91fb3ce 100644
--- a/lib/libvmod_directors/random.c
+++ b/lib/libvmod_directors/random.c
@@ -46,7 +46,7 @@ struct vmod_directors_random {
struct vdir *vd;
};
-static unsigned __match_proto__(vdi_healthy)
+static unsigned v_matchproto_(vdi_healthy)
vmod_random_healthy(const struct director *dir, const struct busyobj *bo,
double *changed)
{
@@ -56,7 +56,7 @@ vmod_random_healthy(const struct director *dir, const struct busyobj *bo,
return (vdir_any_healthy(rr->vd, bo, changed));
}
-static const struct director * __match_proto__(vdi_resolve_f)
+static const struct director * v_matchproto_(vdi_resolve_f)
vmod_random_resolve(const struct director *dir, struct worker *wrk,
struct busyobj *bo)
{
@@ -74,7 +74,7 @@ vmod_random_resolve(const struct director *dir, struct worker *wrk,
return (be);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_random__init(VRT_CTX, struct vmod_directors_random **rrp,
const char *vcl_name)
{
@@ -90,7 +90,7 @@ vmod_random__init(VRT_CTX, struct vmod_directors_random **rrp,
vmod_random_resolve, rr);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_random__fini(struct vmod_directors_random **rrp)
{
struct vmod_directors_random *rr;
@@ -102,7 +102,7 @@ vmod_random__fini(struct vmod_directors_random **rrp)
FREE_OBJ(rr);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_random_add_backend(VRT_CTX,
struct vmod_directors_random *rr, VCL_BACKEND be, double w)
{
@@ -113,14 +113,14 @@ vmod_random_add_backend(VRT_CTX,
}
VCL_VOID vmod_random_remove_backend(VRT_CTX,
- struct vmod_directors_random *rr, VCL_BACKEND be) __match_proto__()
+ struct vmod_directors_random *rr, VCL_BACKEND be) v_matchproto_()
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(rr, VMOD_DIRECTORS_RANDOM_MAGIC);
vdir_remove_backend(ctx, rr->vd, be, NULL);
}
-VCL_BACKEND __match_proto__()
+VCL_BACKEND v_matchproto_()
vmod_random_backend(VRT_CTX, struct vmod_directors_random *rr)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
diff --git a/lib/libvmod_directors/round_robin.c b/lib/libvmod_directors/round_robin.c
index 8b4a92e..3c896cb 100644
--- a/lib/libvmod_directors/round_robin.c
+++ b/lib/libvmod_directors/round_robin.c
@@ -45,7 +45,7 @@ struct vmod_directors_round_robin {
unsigned nxt;
};
-static unsigned __match_proto__(vdi_healthy)
+static unsigned v_matchproto_(vdi_healthy)
vmod_rr_healthy(const struct director *dir, const struct busyobj *bo,
double *changed)
{
@@ -55,7 +55,7 @@ vmod_rr_healthy(const struct director *dir, const struct busyobj *bo,
return (vdir_any_healthy(rr->vd, bo, changed));
}
-static const struct director * __match_proto__(vdi_resolve_f)
+static const struct director * v_matchproto_(vdi_resolve_f)
vmod_rr_resolve(const struct director *dir, struct worker *wrk,
struct busyobj *bo)
{
@@ -83,7 +83,7 @@ vmod_rr_resolve(const struct director *dir, struct worker *wrk,
return (be);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_round_robin__init(VRT_CTX,
struct vmod_directors_round_robin **rrp, const char *vcl_name)
{
@@ -99,7 +99,7 @@ vmod_round_robin__init(VRT_CTX,
vmod_rr_resolve, rr);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_round_robin__fini(struct vmod_directors_round_robin **rrp)
{
struct vmod_directors_round_robin *rr;
@@ -111,7 +111,7 @@ vmod_round_robin__fini(struct vmod_directors_round_robin **rrp)
FREE_OBJ(rr);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_round_robin_add_backend(VRT_CTX,
struct vmod_directors_round_robin *rr, VCL_BACKEND be)
{
@@ -121,7 +121,7 @@ vmod_round_robin_add_backend(VRT_CTX,
vdir_add_backend(ctx, rr->vd, be, 0.0);
}
-VCL_VOID __match_proto__()
+VCL_VOID v_matchproto_()
vmod_round_robin_remove_backend(VRT_CTX,
struct vmod_directors_round_robin *rr, VCL_BACKEND be)
{
@@ -130,7 +130,7 @@ vmod_round_robin_remove_backend(VRT_CTX,
vdir_remove_backend(ctx, rr->vd, be, NULL);
}
-VCL_BACKEND __match_proto__()
+VCL_BACKEND v_matchproto_()
vmod_round_robin_backend(VRT_CTX,
struct vmod_directors_round_robin *rr)
{
diff --git a/lib/libvmod_directors/shard_hash.c b/lib/libvmod_directors/shard_hash.c
index 8ff0eec..9d0dc94 100644
--- a/lib/libvmod_directors/shard_hash.c
+++ b/lib/libvmod_directors/shard_hash.c
@@ -47,7 +47,7 @@
unsigned long crc32(unsigned long, const unsigned char *buf, unsigned len);
-static uint32_t __match_proto__(hash_func)
+static uint32_t v_matchproto_(hash_func)
shard_hash_crc32(VCL_STRING s)
{
uint32_t crc;
@@ -56,7 +56,7 @@ shard_hash_crc32(VCL_STRING s)
return (crc);
}
-static uint32_t __match_proto__(hash_func)
+static uint32_t v_matchproto_(hash_func)
shard_hash_sha256(VCL_STRING s)
{
struct VSHA256Context sha256;
@@ -78,7 +78,7 @@ shard_hash_sha256(VCL_STRING s)
return (r);
}
-static uint32_t __match_proto__(hash_func)
+static uint32_t v_matchproto_(hash_func)
shard_hash_rs(VCL_STRING s)
{
uint32_t res = 0;
@@ -94,7 +94,7 @@ shard_hash_rs(VCL_STRING s)
return (res);
}
-static uint32_t __match_proto__(hash_func)
+static uint32_t v_matchproto_(hash_func)
_shard_hash_invalid(VCL_STRING s)
{
(void)s;
diff --git a/lib/libvmod_directors/vmod_shard.c b/lib/libvmod_directors/vmod_shard.c
index 1893142..e5ddb58 100644
--- a/lib/libvmod_directors/vmod_shard.c
+++ b/lib/libvmod_directors/vmod_shard.c
@@ -48,7 +48,7 @@ struct vmod_directors_shard {
struct sharddir *shardd;
};
-VCL_VOID __match_proto__(td_directors_shard__init)
+VCL_VOID v_matchproto_(td_directors_shard__init)
vmod_shard__init(VRT_CTX, struct vmod_directors_shard **vshardp,
const char *vcl_name)
{
@@ -73,7 +73,7 @@ vmod_shard__init(VRT_CTX, struct vmod_directors_shard **vshardp,
sharddir_new(&vshard->shardd, vcl_name);
}
-VCL_VOID __match_proto__(td_directors_shard__fini)
+VCL_VOID v_matchproto_(td_directors_shard__fini)
vmod_shard__fini(struct vmod_directors_shard **vshardp)
{
struct vmod_directors_shard *vshard = *vshardp;
@@ -89,7 +89,7 @@ vmod_shard__fini(struct vmod_directors_shard **vshardp)
* forth, asserting in vmod_shard__init() that VCL_INT is a large enough
* container
*/
-VCL_INT __match_proto__(td_directors_shard_key)
+VCL_INT v_matchproto_(td_directors_shard_key)
vmod_shard_key(VRT_CTX, struct vmod_directors_shard *vshard,
VCL_STRING s, VCL_ENUM alg_s)
{
@@ -102,7 +102,7 @@ VCL_INT __match_proto__(td_directors_shard_key)
return (VCL_INT)hash_fp(s ? s : "");
}
-VCL_VOID __match_proto__(td_directors_set_warmup)
+VCL_VOID v_matchproto_(td_directors_set_warmup)
vmod_shard_set_warmup(VRT_CTX, struct vmod_directors_shard *vshard,
VCL_REAL probability)
{
@@ -115,7 +115,7 @@ vmod_shard_set_warmup(VRT_CTX, struct vmod_directors_shard *vshard,
shardcfg_set_warmup(vshard->shardd, probability);
}
-VCL_VOID __match_proto__(td_directors_set_rampup)
+VCL_VOID v_matchproto_(td_directors_set_rampup)
vmod_shard_set_rampup(VRT_CTX, struct vmod_directors_shard *vshard,
VCL_DURATION duration)
{
@@ -124,7 +124,7 @@ vmod_shard_set_rampup(VRT_CTX, struct vmod_directors_shard *vshard,
shardcfg_set_rampup(vshard->shardd, duration);
}
-VCL_BOOL __match_proto__(td_directors_shard_add_backend)
+VCL_BOOL v_matchproto_(td_directors_shard_add_backend)
vmod_shard_add_backend(VRT_CTX, struct vmod_directors_shard *vshard,
struct vmod_priv *priv,
VCL_BACKEND be, VCL_STRING ident, VCL_DURATION rampup)
@@ -141,7 +141,7 @@ vmod_shard_add_backend(VRT_CTX, struct vmod_directors_shard *vshard,
be, ident, rampup);
}
-VCL_BOOL __match_proto__(td_directors_shard_remove_backend)
+VCL_BOOL v_matchproto_(td_directors_shard_remove_backend)
vmod_shard_remove_backend(VRT_CTX, struct vmod_directors_shard *vshard,
struct vmod_priv *priv,
VCL_BACKEND be, VCL_STRING ident)
@@ -159,7 +159,7 @@ vmod_shard_remove_backend(VRT_CTX, struct vmod_directors_shard *vshard,
be, ident);
}
-VCL_BOOL __match_proto__(td_directors_shard_clear)
+VCL_BOOL v_matchproto_(td_directors_shard_clear)
vmod_shard_clear(VRT_CTX, struct vmod_directors_shard *vshard,
struct vmod_priv *priv)
{
@@ -167,7 +167,7 @@ vmod_shard_clear(VRT_CTX, struct vmod_directors_shard *vshard,
return shardcfg_clear(ctx, priv, vshard->shardd);
}
-VCL_BOOL __match_proto__(td_directors_shard_reconfigure)
+VCL_BOOL v_matchproto_(td_directors_shard_reconfigure)
vmod_shard_reconfigure(VRT_CTX, struct vmod_directors_shard *vshard,
struct vmod_priv *priv, VCL_INT replicas, VCL_ENUM alg_s)
{
@@ -222,7 +222,7 @@ get_key(VRT_CTX, enum by_e by, VCL_INT key_int, VCL_BLOB key_blob)
}
}
-VCL_BACKEND __match_proto__(td_directors_shard_backend)
+VCL_BACKEND v_matchproto_(td_directors_shard_backend)
vmod_shard_backend(VRT_CTX, struct vmod_directors_shard *vshard,
VCL_ENUM by_s, VCL_INT key_int, VCL_BLOB key_blob, VCL_INT alt,
VCL_REAL warmup, VCL_BOOL rampup, VCL_ENUM healthy_s)
@@ -272,7 +272,7 @@ vmod_shard_backend(VRT_CTX, struct vmod_directors_shard *vshard,
key, alt, warmup, rampup, healthy));
}
-VCL_VOID __match_proto__(td_directors_shard_backend)
+VCL_VOID v_matchproto_(td_directors_shard_backend)
vmod_shard_debug(VRT_CTX, struct vmod_directors_shard *vshard,
VCL_INT i)
{
diff --git a/lib/libvmod_purge/vmod_purge.c b/lib/libvmod_purge/vmod_purge.c
index 0df0c45..1a01bae 100644
--- a/lib/libvmod_purge/vmod_purge.c
+++ b/lib/libvmod_purge/vmod_purge.c
@@ -38,7 +38,7 @@
#include "vcc_if.h"
-VCL_INT __match_proto__(td_purge_hard)
+VCL_INT v_matchproto_(td_purge_hard)
vmod_hard(VRT_CTX)
{
@@ -46,7 +46,7 @@ vmod_hard(VRT_CTX)
return (VRT_purge(ctx, 0, 0, 0));
}
-VCL_INT __match_proto__(td_purge_soft)
+VCL_INT v_matchproto_(td_purge_soft)
vmod_soft(VRT_CTX, VCL_DURATION ttl, VCL_DURATION grace, VCL_DURATION keep)
{
diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index f4536ec..414a521 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -50,7 +50,7 @@
#include "vcc_if.h"
-VCL_VOID __match_proto__(td_std_set_ip_tos)
+VCL_VOID v_matchproto_(td_std_set_ip_tos)
vmod_set_ip_tos(VRT_CTX, VCL_INT tos)
{
int itos = tos;
@@ -97,7 +97,7 @@ vmod_updown(VRT_CTX, int up, const char *s, va_list ap)
}
}
-VCL_STRING __match_proto__(td_std_toupper)
+VCL_STRING v_matchproto_(td_std_toupper)
vmod_toupper(VRT_CTX, const char *s, ...)
{
const char *p;
@@ -110,7 +110,7 @@ vmod_toupper(VRT_CTX, const char *s, ...)
return (p);
}
-VCL_STRING __match_proto__(td_std_tolower)
+VCL_STRING v_matchproto_(td_std_tolower)
vmod_tolower(VRT_CTX, const char *s, ...)
{
const char *p;
@@ -123,7 +123,7 @@ vmod_tolower(VRT_CTX, const char *s, ...)
return (p);
}
-VCL_REAL __match_proto__(td_std_random)
+VCL_REAL v_matchproto_(td_std_random)
vmod_random(VRT_CTX, VCL_REAL lo, VCL_REAL hi)
{
double a;
@@ -135,7 +135,7 @@ vmod_random(VRT_CTX, VCL_REAL lo, VCL_REAL hi)
return (a);
}
-VCL_VOID __match_proto__(td_std_log)
+VCL_VOID v_matchproto_(td_std_log)
vmod_log(VRT_CTX, const char *fmt, ...)
{
const char *p;
@@ -163,7 +163,7 @@ vmod_log(VRT_CTX, const char *fmt, ...)
}
/* XXX use vsyslog() ? */
-VCL_VOID __match_proto__(td_std_syslog)
+VCL_VOID v_matchproto_(td_std_syslog)
vmod_syslog(VRT_CTX, VCL_INT fac, const char *fmt, ...)
{
const char *p;
@@ -180,7 +180,7 @@ vmod_syslog(VRT_CTX, VCL_INT fac, const char *fmt, ...)
WS_Reset(ctx->ws, sn);
}
-VCL_BOOL __match_proto__(td_std_file_exists)
+VCL_BOOL v_matchproto_(td_std_file_exists)
vmod_file_exists(VRT_CTX, VCL_STRING file_name)
{
struct stat st;
@@ -189,7 +189,7 @@ vmod_file_exists(VRT_CTX, VCL_STRING file_name)
return (stat(file_name, &st) == 0);
}
-VCL_VOID __match_proto__(td_std_collect)
+VCL_VOID v_matchproto_(td_std_collect)
vmod_collect(VRT_CTX, VCL_HEADER hdr, VCL_STRING sep)
{
struct http *hp;
@@ -199,7 +199,7 @@ vmod_collect(VRT_CTX, VCL_HEADER hdr, VCL_STRING sep)
http_CollectHdrSep(hp, hdr->what, sep);
}
-VCL_BOOL __match_proto__(td_std_healthy)
+VCL_BOOL v_matchproto_(td_std_healthy)
vmod_healthy(VRT_CTX, VCL_BACKEND be)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -207,7 +207,7 @@ vmod_healthy(VRT_CTX, VCL_BACKEND be)
return (VRT_Healthy(ctx, be));
}
-VCL_INT __match_proto__(td_std_port)
+VCL_INT v_matchproto_(td_std_port)
vmod_port(VRT_CTX, VCL_IP ip)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -216,13 +216,13 @@ vmod_port(VRT_CTX, VCL_IP ip)
return (VSA_Port(ip));
}
-VCL_VOID __match_proto__(td_std_rollback)
+VCL_VOID v_matchproto_(td_std_rollback)
vmod_rollback(VRT_CTX, VCL_HTTP hp)
{
VRT_Rollback(ctx, hp);
}
-VCL_VOID __match_proto__(td_std_timestamp)
+VCL_VOID v_matchproto_(td_std_timestamp)
vmod_timestamp(VRT_CTX, VCL_STRING label)
{
@@ -242,7 +242,7 @@ vmod_timestamp(VRT_CTX, VCL_STRING label)
}
}
-VCL_BOOL __match_proto__(td_std_cache_req_body)
+VCL_BOOL v_matchproto_(td_std_cache_req_body)
vmod_cache_req_body(VRT_CTX, VCL_BYTES size)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -253,7 +253,7 @@ vmod_cache_req_body(VRT_CTX, VCL_BYTES size)
return (1);
}
-VCL_STRING __match_proto__(td_std_strstr)
+VCL_STRING v_matchproto_(td_std_strstr)
vmod_strstr(VRT_CTX, VCL_STRING s1, VCL_STRING s2)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -262,7 +262,7 @@ vmod_strstr(VRT_CTX, VCL_STRING s1, VCL_STRING s2)
return (strstr(s1, s2));
}
-VCL_STRING __match_proto__(td_std_getenv)
+VCL_STRING v_matchproto_(td_std_getenv)
vmod_getenv(VRT_CTX, VCL_STRING name)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -271,7 +271,7 @@ vmod_getenv(VRT_CTX, VCL_STRING name)
return (getenv(name));
}
-VCL_VOID __match_proto__(td_std_late_100_continue)
+VCL_VOID v_matchproto_(td_std_late_100_continue)
vmod_late_100_continue(VRT_CTX, VCL_BOOL late)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c
index c71b771..18b0b47 100644
--- a/lib/libvmod_std/vmod_std_conversions.c
+++ b/lib/libvmod_std/vmod_std_conversions.c
@@ -44,7 +44,7 @@
#include "vtim.h"
#include "vcc_if.h"
-VCL_DURATION __match_proto__(td_std_duration)
+VCL_DURATION v_matchproto_(td_std_duration)
vmod_duration(VRT_CTX, VCL_STRING p, VCL_DURATION d)
{
double r = VNUM_duration(p);
@@ -54,7 +54,7 @@ vmod_duration(VRT_CTX, VCL_STRING p, VCL_DURATION d)
return (isnan(r) ? d : r);
}
-VCL_INT __match_proto__(td_std_integer)
+VCL_INT v_matchproto_(td_std_integer)
vmod_integer(VRT_CTX, VCL_STRING p, VCL_INT i)
{
const char *e;
@@ -119,7 +119,7 @@ vmod_ip(VRT_CTX, VCL_STRING s, VCL_IP d)
return (r);
}
-VCL_REAL __match_proto__(td_std_real)
+VCL_REAL v_matchproto_(td_std_real)
vmod_real(VRT_CTX, VCL_STRING p, VCL_REAL d)
{
double r;
@@ -137,7 +137,7 @@ vmod_real(VRT_CTX, VCL_STRING p, VCL_REAL d)
return (r);
}
-VCL_INT __match_proto__(td_std_real2integer)
+VCL_INT v_matchproto_(td_std_real2integer)
vmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -150,7 +150,7 @@ vmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)
return ((long)r);
}
-VCL_TIME __match_proto__(td_std_real2time)
+VCL_TIME v_matchproto_(td_std_real2time)
vmod_real2time(VRT_CTX, VCL_REAL r, VCL_TIME t)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -161,7 +161,7 @@ vmod_real2time(VRT_CTX, VCL_REAL r, VCL_TIME t)
return (r);
}
-VCL_INT __match_proto__(td_std_time2integer)
+VCL_INT v_matchproto_(td_std_time2integer)
vmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -174,7 +174,7 @@ vmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)
return ((long)t);
}
-VCL_REAL __match_proto__(td_std_time2real)
+VCL_REAL v_matchproto_(td_std_time2real)
vmod_time2real(VRT_CTX, VCL_TIME t, VCL_REAL r)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -185,7 +185,7 @@ vmod_time2real(VRT_CTX, VCL_TIME t, VCL_REAL r)
return (t);
}
-VCL_TIME __match_proto__(td_std_time)
+VCL_TIME v_matchproto_(td_std_time)
vmod_time(VRT_CTX, VCL_STRING p, VCL_TIME d)
{
double r;
diff --git a/lib/libvmod_std/vmod_std_fileread.c b/lib/libvmod_std/vmod_std_fileread.c
index 2be46ff..201d743 100644
--- a/lib/libvmod_std/vmod_std_fileread.c
+++ b/lib/libvmod_std/vmod_std_fileread.c
@@ -80,7 +80,7 @@ free_frfile(void *ptr)
}
}
-VCL_STRING __match_proto__(td_std_fileread)
+VCL_STRING v_matchproto_(td_std_fileread)
vmod_fileread(VRT_CTX, struct vmod_priv *priv,
VCL_STRING file_name)
{
diff --git a/lib/libvmod_std/vmod_std_querysort.c b/lib/libvmod_std/vmod_std_querysort.c
index 52a95f9..4b99092 100644
--- a/lib/libvmod_std/vmod_std_querysort.c
+++ b/lib/libvmod_std/vmod_std_querysort.c
@@ -48,7 +48,7 @@ compa(const void *a, const void *b)
return (0);
}
-VCL_STRING __match_proto__(td_std_querysort)
+VCL_STRING v_matchproto_(td_std_querysort)
vmod_querysort(VRT_CTX, VCL_STRING url)
{
const char *cq, *cu;
diff --git a/lib/libvmod_vtc/vmod_vtc.c b/lib/libvmod_vtc/vmod_vtc.c
index c91eb2e..6b6501a 100644
--- a/lib/libvmod_vtc/vmod_vtc.c
+++ b/lib/libvmod_vtc/vmod_vtc.c
@@ -41,7 +41,7 @@
#include "vcc_if.h"
-VCL_VOID __match_proto__(td_vtc_barrier_sync)
+VCL_VOID v_matchproto_(td_vtc_barrier_sync)
vmod_barrier_sync(VRT_CTX, VCL_STRING addr, VCL_DURATION tmo)
{
const char *err;
@@ -73,7 +73,7 @@ vmod_barrier_sync(VRT_CTX, VCL_STRING addr, VCL_DURATION tmo)
/*--------------------------------------------------------------------*/
-VCL_BACKEND __match_proto__(td_vtc_no_backend)
+VCL_BACKEND v_matchproto_(td_vtc_no_backend)
vmod_no_backend(VRT_CTX)
{
@@ -81,7 +81,7 @@ vmod_no_backend(VRT_CTX)
return (NULL);
}
-VCL_STEVEDORE __match_proto__(td_vtc_no_stevedore)
+VCL_STEVEDORE v_matchproto_(td_vtc_no_stevedore)
vmod_no_stevedore(VRT_CTX)
{
@@ -91,7 +91,7 @@ vmod_no_stevedore(VRT_CTX)
/*--------------------------------------------------------------------*/
-VCL_VOID __match_proto__(td_vtc_panic)
+VCL_VOID v_matchproto_(td_vtc_panic)
vmod_panic(VRT_CTX, const char *str, ...)
{
va_list ap;
@@ -107,7 +107,7 @@ vmod_panic(VRT_CTX, const char *str, ...)
/*--------------------------------------------------------------------*/
-VCL_VOID __match_proto__(td_vtc_sleep)
+VCL_VOID v_matchproto_(td_vtc_sleep)
vmod_sleep(VRT_CTX, VCL_DURATION t)
{
@@ -134,7 +134,7 @@ vtc_ws_find(VRT_CTX, VCL_ENUM which)
WRONG("vtc_ws_find Illegal enum");
}
-VCL_VOID __match_proto__(td_vtc_workspace_alloc)
+VCL_VOID v_matchproto_(td_vtc_workspace_alloc)
vmod_workspace_alloc(VRT_CTX, VCL_ENUM which, VCL_INT size)
{
struct ws *ws;
@@ -162,7 +162,7 @@ vmod_workspace_alloc(VRT_CTX, VCL_ENUM which, VCL_INT size)
memset(p, '\0', size);
}
-VCL_INT __match_proto__(td_vtc_workspace_free)
+VCL_INT v_matchproto_(td_vtc_workspace_free)
vmod_workspace_free(VRT_CTX, VCL_ENUM which)
{
struct ws *ws;
@@ -181,7 +181,7 @@ vmod_workspace_free(VRT_CTX, VCL_ENUM which)
}
#define VTC_WS_OP(type, def, name, op) \
-VCL_##type __match_proto__(td_vtc_workspace_##name) \
+VCL_##type v_matchproto_(td_vtc_workspace_##name) \
vmod_workspace_##name(VRT_CTX, VCL_ENUM which) \
{ \
struct ws *ws; \
@@ -203,7 +203,7 @@ VTC_WS_OP(BOOL, (0), overflowed, return (WS_Overflowed(ws)))
/*--------------------------------------------------------------------*/
-VCL_INT __match_proto__(td_vtc_typesize)
+VCL_INT v_matchproto_(td_vtc_typesize)
vmod_typesize(VRT_CTX, VCL_STRING s)
{
size_t i = 0;
More information about the varnish-commit
mailing list