diff options
Diffstat (limited to '3rdparty/luafilesystem/src/lfs.h')
-rw-r--r-- | 3rdparty/luafilesystem/src/lfs.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/3rdparty/luafilesystem/src/lfs.h b/3rdparty/luafilesystem/src/lfs.h new file mode 100644 index 00000000000..ea1720dba75 --- /dev/null +++ b/3rdparty/luafilesystem/src/lfs.h @@ -0,0 +1,34 @@ +/* +** LuaFileSystem +** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) +** +** $Id: lfs.h,v 1.5 2008/02/19 20:08:23 mascarenhas Exp $ +*/ + +/* Define 'chdir' for systems that do not implement it */ +#ifdef NO_CHDIR +#define chdir(p) (-1) +#define chdir_error "Function 'chdir' not provided by system" +#else +#define chdir_error strerror(errno) + +#endif + +#ifdef _WIN32 +#define chdir(p) (_chdir(p)) +#define getcwd(d, s) (_getcwd(d, s)) +#define rmdir(p) (_rmdir(p)) +#ifndef fileno +#define fileno(f) (_fileno(f)) +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +int luaopen_lfs (lua_State *L); + +#ifdef __cplusplus +} +#endif |