lfs.h 673 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. ** LuaFileSystem
  3. ** Copyright Kepler Project 2003 - 2020
  4. ** (http://keplerproject.github.io/luafilesystem)
  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. #ifdef _WIN32
  14. #define chdir(p) (_chdir(p))
  15. #define getcwd(d, s) (_getcwd(d, s))
  16. #define rmdir(p) (_rmdir(p))
  17. #define LFS_EXPORT __declspec (dllexport)
  18. #ifndef fileno
  19. #define fileno(f) (_fileno(f))
  20. #endif
  21. #else
  22. #define LFS_EXPORT
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. LFS_EXPORT int luaopen_lfs(lua_State * L);
  28. #ifdef __cplusplus
  29. }
  30. #endif