lfs.h 621 B

1234567891011121314151617181920212223242526272829303132
  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. /* Define 'chdir' for systems that do not implement it */
  8. #ifdef NO_CHDIR
  9. #define chdir(p) (-1)
  10. #define chdir_error "Function 'chdir' not provided by system"
  11. #else
  12. #define chdir_error strerror(errno)
  13. #endif
  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 fileno(f) (_fileno(f))
  19. #endif
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. int luaopen_lfs (lua_State *L);
  24. #ifdef __cplusplus
  25. }
  26. #endif