From 445bc2914a04b74b5b8e0a3a10ef89734e5f2094 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 5 Dec 2016 17:47:35 -0500 Subject: [PATCH] [mod_cml] include lua headers before base.h to avoid (historical) conflict with IN and OUT macros used in lua and openssl headers (since base.h includes openssl headers when present) --- src/mod_cml_funcs.c | 28 +++++++++++----------------- src/mod_cml_lua.c | 24 +++++++++--------------- 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/src/mod_cml_funcs.c b/src/mod_cml_funcs.c index 036c4856..a62ec5e4 100644 --- a/src/mod_cml_funcs.c +++ b/src/mod_cml_funcs.c @@ -1,14 +1,5 @@ #include "first.h" -#include "buffer.h" -#include "server.h" -#include "log.h" -#include "plugin.h" -#include "response.h" - -#include "mod_cml.h" -#include "mod_cml_funcs.h" - #include #include @@ -19,20 +10,23 @@ #include #include +#include + +#include "mod_cml_funcs.h" +#include "mod_cml.h" + +#include "buffer.h" +#include "server.h" +#include "log.h" +#include "plugin.h" +#include "response.h" + #include "md5.h" #define HASHLEN 16 typedef unsigned char HASH[HASHLEN]; #define HASHHEXLEN 32 typedef char HASHHEX[HASHHEXLEN+1]; -#ifdef USE_OPENSSL -#define IN const -#else -#define IN -#endif -#define OUT - -#include int f_crypto_md5(lua_State *L) { li_MD5_CTX Md5Ctx; diff --git a/src/mod_cml_lua.c b/src/mod_cml_lua.c index 05fc208d..e9f5c8b8 100644 --- a/src/mod_cml_lua.c +++ b/src/mod_cml_lua.c @@ -1,10 +1,8 @@ #include "first.h" -#include "mod_cml.h" -#include "mod_cml_funcs.h" -#include "log.h" - -#include "stat_cache.h" +#include +#include +#include #include #include @@ -12,20 +10,16 @@ #include #include +#include "mod_cml_funcs.h" +#include "mod_cml.h" + +#include "log.h" +#include "stat_cache.h" + #define HASHLEN 16 typedef unsigned char HASH[HASHLEN]; #define HASHHEXLEN 32 typedef char HASHHEX[HASHHEXLEN+1]; -#ifdef USE_OPENSSL -#define IN const -#else -#define IN -#endif -#define OUT - -#include -#include -#include static int lua_to_c_get_string(lua_State *L, const char *varname, buffer *b) { int curelem = lua_gettop(L); -- 2.11.4.GIT