From c409988d423bca50a0cab95051554b2aeef6827d Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Fri, 26 Nov 2010 19:32:13 +0000 Subject: [PATCH] Fix another Windows build issue: Add a wrapper around ap_run_expr_lookup with the correct calling convention. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1039528 13f79535-47bb-0310-9956-ffa450edef68 --- include/ap_expr.h | 13 ++++++++++--- server/util_expr_eval.c | 6 +++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/ap_expr.h b/include/ap_expr.h index f71f8817bb..dbfff1302e 100644 --- a/include/ap_expr.h +++ b/include/ap_expr.h @@ -121,14 +121,15 @@ typedef struct { /** - * The parse can be extended with variable lookup, functions, and + * The parser can be extended with variable lookup, functions, and * and operators. * * During parsing, the parser calls the lookup function to resolve a * name into a function pointer and an opaque context for the function. * - * The default lookup function is the hook 'ap_run_expr_lookup'. - * Modules can use it to make functions and variables generally available. + * The default lookup function is the hook 'ap_expr_lookup_default' which just + * calls ap_expr_lookup_default. Modules can use it to make functions and + * variables generally available. * * An ap_expr consumer can also provide its own custom lookup function to * modify the set of variables and functions that are available. The custom @@ -217,6 +218,12 @@ typedef struct { */ typedef int (ap_expr_lookup_fn)(ap_expr_lookup_parms *parms); +/** Default lookup function which just calls ap_run_expr_lookup(). + * ap_run_expr_lookup cannot be used directly because it has the wrong + * calling convention under Windows. + */ +AP_DECLARE_NONSTD(int) ap_expr_lookup_default(ap_expr_lookup_parms *parms); + AP_DECLARE_HOOK(int, expr_lookup, (ap_expr_lookup_parms *parms)) /** diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 3b5cf1cb11..ddd94c1a63 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -327,6 +327,10 @@ static int ssl_expr_eval_comp(ap_expr_eval_ctx *ctx, const ap_expr *node) } } +AP_DECLARE_NONSTD(int) ap_expr_lookup_default(ap_expr_lookup_parms *parms) +{ + return ap_run_expr_lookup(parms); +} AP_DECLARE(const char *) ap_expr_parse(apr_pool_t *pool, apr_pool_t *ptemp, ap_expr_info_t *info, const char *expr, @@ -347,7 +351,7 @@ AP_DECLARE(const char *) ap_expr_parse(apr_pool_t *pool, apr_pool_t *ptemp, ctx.scan_del = '\0'; ctx.scan_buf[0] = '\0'; ctx.scan_ptr = ctx.scan_buf; - ctx.lookup_fn = lookup_fn ? lookup_fn : ap_run_expr_lookup; + ctx.lookup_fn = lookup_fn ? lookup_fn : ap_expr_lookup_default; /* -- 2.40.0