The attach patch to LuaFileSystem 1.4.2 makes the following improvements:
- Implement setmode on Cygwin. Previously it gave a compiler warning about
_O_TEXT/_O_BINARY being redefined. Cygwin, like Unix, normally
only operates
in binary mode. However, there is a way to mount file systems as
in Windows text
mode. [1-2]
- Eliminate DESCRIPTION field from the .def files. This is
optional, and perhaps it is
still used by Digital Mars [3]. It was supported in MSVC2003 [1]
but only for virtual
device drivers [4]. As of MSVC2005, it is not listed as on option
[5], and in fact
it gives a warning at least in MSVC2008. VERSION field was removed since
AFAIK, it doesn't do much (in fact the vc6/lfs.def is
inconsistent) and could be defined
via a linker switch. The LIBRARY field was removed since AFAIK
it's fairly pointless.
The main use of the .def is to just say that luaopen_lfs is exported.
- Add LUAFILESYSTEM_API define before luaopen_lfs (consistent with luasocket).
This allows one to set a compiler define to apply attributes on
luaopen_lfs, such
as __declspec(dllexport) or gcc attributes [6]. This is one way
to avoid .def files on MSVC,
and it can improve symbol exporting on other platforms.
LUAFILESYSTEM_API is
better than nothing, but I'm not sure it's the best name.
Unfortunately, there doesn't seem
to be much convention here. Some Lua modules reuse the LUA_API
define from luaconf.h,
but I think that might cause conflicts on some usage modes
- Eliminated /D "LUAFILESYSTEM_EXPORTS" from luafilesystem_dll.dsp.
This define isn't used anywhere
[1] http://www.cygwin.com/cygwin-ug-net/using-utils.html#mount
[2] http://cygwin.com/1.7/faq/faq.api.html#faq.api.cr-lf
[3] http://www.digitalmars.com/ctg/ctgDefFiles.html
[4] http://msdn.microsoft.com/en-us/library/aa984816%28VS.71%29.aspx
[5] http://msdn.microsoft.com/en-us/library/28d6s79h%28VS.80%29.aspx
[6] http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Function-Attributes.html
lfs-patch
Description: Binary data
_______________________________________________ Kepler-Project mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/
