mudgangster

Tiny, scriptable MUD client
Log | Files | Refs | README

lfs.h (693B)


      1 /*
      2 ** LuaFileSystem
      3 ** Copyright Kepler Project 2003 - 2017 (http://keplerproject.github.io/luafilesystem)
      4 */
      5 
      6 /* Define 'chdir' for systems that do not implement it */
      7 #ifdef NO_CHDIR
      8   #define chdir(p)	(-1)
      9   #define chdir_error	"Function 'chdir' not provided by system"
     10 #else
     11   #define chdir_error	strerror(errno)
     12 #endif
     13 
     14 #ifdef _WIN32
     15   #define chdir(p) (_chdir(p))
     16   #define getcwd(d, s) (_getcwd(d, s))
     17   #define rmdir(p) (_rmdir(p))
     18   #define LFS_EXPORT __declspec (dllexport)
     19   #ifndef fileno
     20     #define fileno(f) (_fileno(f))
     21   #endif
     22 #else
     23   #define LFS_EXPORT
     24 #endif
     25 
     26 #ifdef __cplusplus
     27 extern "C" {
     28 #endif
     29 
     30 LFS_EXPORT  int luaopen_lfs (lua_State *L);
     31 
     32 #ifdef __cplusplus
     33 }
     34 #endif