lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


 

> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br 
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Renato Maia
> Sent: Thursday, February 21, 2008 6:54 PM
> To: Lua list
> Subject: Re: Lua for OpenVMS ?

> Lua indeed builds just fine in OpenVMS. I only had to write a script  
> to build it, because I didn't have a 'make' in the VMS I was 
> using. I  
> also had problems with 'require' due to the peculiar VMS paths:
> 
>    http://lua-users.org/lists/lua-l/2007-10/msg00238.html
> 
> I followed Roberto's suggestion and applied the following 
> patch to Lua:

I will check that. 

BTW, what tool are you using to apply un*x-looking patch like this one
on VMS?

> --- lua-5.1.2/src/luaconf.h	2007-03-24 00:01:55.000000000 -0300
> +++ luaconf.h	2007-10-13 06:32:38.000000000 -0300
> @@ -93,6 +93,10 @@
>   #define LUA_CPATH_DEFAULT \
>   	".\\?.dll;"  LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
> 
> +#elif defined(VMS)
> +#define LUA_PATH_DEFAULT  "?.lua;[.LUA]?.lua"
> +#define LUA_CPATH_DEFAULT "?.so"
> +
>   #else
>   #define LUA_ROOT	"/usr/local/"
>   #define LUA_LDIR	LUA_ROOT "share/lua/5.1/"
> @@ -112,6 +116,8 @@
>   */
>   #if defined(_WIN32)
>   #define LUA_DIRSEP	"\\"
> +#elif defined(VMS)
> +#define LUA_DIRSEP	"_"
>   #else
>   #define LUA_DIRSEP	"/"
>   #endif
> 
> Unfortunately, I didn't have the time or need to check out how to  
> dynamic load C libraries in OpenVMS, though.

I never did it from C, only from Pascal. from Pascal it's quite easy. it
should be the same from C. the most difficult is to *create* the dynamic
library ('shared image' im VMS parlance)
 
> Best regards.
> 
> --
> Renato Maia
> PhD student at PUC-Rio
> __________________________
> http://www.inf.puc-rio.br/~maia/

Pierre