Commit 10194de3 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Merged revisions 1830 via svnmerge from

svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache

........
  r1830 | phk | 2007-08-10 12:28:08 +0200 (Fri, 10 Aug 2007) | 4 lines
  
  Don't call functions outside the VRT namespace, even if this means
  that we have to wrap strcmp().
........


git-svn-id: http://www.varnish-cache.org/svn/branches/1.1@1986 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4ab24ece
......@@ -532,3 +532,13 @@ VRT_purge(const char *regexp)
AddBan(regexp);
}
/*--------------------------------------------------------------------
* Simple stuff
*/
int
VRT_strcmp(const char *s1, const char *s2)
{
return (strcmp(s1, s2));
}
......@@ -82,6 +82,10 @@ char *VRT_GetHdr(struct sess *, enum gethdr_e where, const char *);
void VRT_SetHdr(struct sess *, enum gethdr_e where, const char *, const char *, ...);
void VRT_handling(struct sess *sp, unsigned hand);
/* Simple stuff */
int VRT_strcmp(const char *s1, const char *s2);
/* Backend related */
void VRT_set_backend_name(struct backend *, const char *);
void VRT_alloc_backends(struct VCL_conf *cp);
......
......@@ -440,6 +440,10 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, "void VRT_SetHdr(struct sess *, enum gethdr_e where, const char *, const char *, ...);\n");
vsb_cat(sb, "void VRT_handling(struct sess *sp, unsigned hand);\n");
vsb_cat(sb, "\n");
vsb_cat(sb, "/* Simple stuff */\n");
vsb_cat(sb, "int VRT_strcmp(const char *s1, const char *s2);\n");
vsb_cat(sb, "\n");
vsb_cat(sb, "\n");
vsb_cat(sb, "/* Backend related */\n");
vsb_cat(sb, "void VRT_set_backend_name(struct backend *, const char *);\n");
vsb_cat(sb, "void VRT_alloc_backends(struct VCL_conf *cp);\n");
......
......@@ -232,7 +232,7 @@ Cond_String(const struct var *vp, struct tokenlist *tl)
break;
case T_EQ:
case T_NEQ:
Fb(tl, 1, "%sstrcmp(%s, ",
Fb(tl, 1, "%sVRT_strcmp(%s, ",
tl->t->tok == T_EQ ? "!" : "", vp->rname);
vcc_NextToken(tl);
ExpectErr(tl, CSTR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment