Skip to content

Commit

Permalink
Provide proper module extension.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1487769 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Guenter Knauf committed May 30, 2013
1 parent 5656857 commit 03489bb
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions modules/lua/lua_vmprep.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@

APLOG_USE_MODULE(lua);

#ifndef AP_LUA_MODULE_EXT
#if defined(NETWARE)
#define AP_LUA_MODULE_EXT ".nlm"
#elif defined(WIN32)
#define AP_LUA_MODULE_EXT ".dll"
#elif (defined(__hpux__) || defined(__hpux)) && !defined(__ia64)
#define AP_LUA_MODULE_EXT ".sl"
#else
#define AP_LUA_MODULE_EXT ".so"
#endif
#endif

#if APR_HAS_THREADS
apr_thread_mutex_t *ap_lua_mutex;

Expand Down Expand Up @@ -314,8 +326,11 @@ static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifec
spec->file);
}
if (spec->package_cpaths) {
munge_path(L, "cpath", "?.so", "./?.so", lifecycle_pool,
spec->package_cpaths, spec->file);
munge_path(L,
"cpath", "?" AP_LUA_MODULE_EXT, "./?" AP_LUA_MODULE_EXT,
lifecycle_pool,
spec->package_cpaths,
spec->file);
}

if (spec->cb) {
Expand Down

0 comments on commit 03489bb

Please sign in to comment.