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