From de6fc75d630b393d8b577ba03353abe527523d0f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 17 Dec 2009 10:26:09 -0200 Subject: several configuration options that do not change often moved out of luaconf.h and into more internal files --- loadlib.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'loadlib.c') diff --git a/loadlib.c b/loadlib.c index 0c3db013..6d7c5628 100644 --- a/loadlib.c +++ b/loadlib.c @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.67 2009/11/16 15:51:19 roberto Exp roberto $ +** $Id: loadlib.c,v 1.68 2009/11/24 12:05:44 roberto Exp roberto $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** @@ -22,6 +22,43 @@ #include "lualib.h" +/* +** LUA_PATH and LUA_CPATH are the names of the environment variables that +** Lua check to set its paths. +*/ +#if !defined(LUA_PATH) +#define LUA_PATH "LUA_PATH" +#endif + +#if !defined(LUA_CPATH) +#define LUA_CPATH "LUA_CPATH" +#endif + + +/* +** LUA_PATHSEP is the character that separates templates in a path. +** LUA_PATH_MARK is the string that marks the substitution points in a +** template. +** LUA_EXECDIR in a Windows path is replaced by the executable's +** directory. +** LUA_IGMARK is a mark to ignore all before it when building the +** luaopen_ function name. +*/ +#if !defined (LUA_PATHSEP) +#define LUA_PATHSEP ";" +#endif +#if !defined (LUA_PATH_MARK) +#define LUA_PATH_MARK "?" +#endif +#if !defined (LUA_EXECDIR) +#define LUA_EXECDIR "!" +#endif +#if !defined (LUA_IGMARK) +#define LUA_IGMARK "-" +#endif + + + /* prefix for open functions in C libraries */ #define LUA_POF "luaopen_" -- cgit v1.2.3-55-g6feb