mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-25 13:13:07 +00:00
indent -kr -nut -i2 src/lfs.c src/lfs.h
This commit is contained in:
27
src/lfs.h
27
src/lfs.h
@@ -1,33 +1,34 @@
|
|||||||
/*
|
/*
|
||||||
** LuaFileSystem
|
** LuaFileSystem
|
||||||
** Copyright Kepler Project 2003 - 2017 (http://keplerproject.github.io/luafilesystem)
|
** Copyright Kepler Project 2003 - 2020
|
||||||
|
** (http://keplerproject.github.io/luafilesystem)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define 'chdir' for systems that do not implement it */
|
/* Define 'chdir' for systems that do not implement it */
|
||||||
#ifdef NO_CHDIR
|
#ifdef NO_CHDIR
|
||||||
#define chdir(p) (-1)
|
#define chdir(p) (-1)
|
||||||
#define chdir_error "Function 'chdir' not provided by system"
|
#define chdir_error "Function 'chdir' not provided by system"
|
||||||
#else
|
#else
|
||||||
#define chdir_error strerror(errno)
|
#define chdir_error strerror(errno)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define chdir(p) (_chdir(p))
|
#define chdir(p) (_chdir(p))
|
||||||
#define getcwd(d, s) (_getcwd(d, s))
|
#define getcwd(d, s) (_getcwd(d, s))
|
||||||
#define rmdir(p) (_rmdir(p))
|
#define rmdir(p) (_rmdir(p))
|
||||||
#define LFS_EXPORT __declspec (dllexport)
|
#define LFS_EXPORT __declspec (dllexport)
|
||||||
#ifndef fileno
|
#ifndef fileno
|
||||||
#define fileno(f) (_fileno(f))
|
#define fileno(f) (_fileno(f))
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define LFS_EXPORT
|
#define LFS_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LFS_EXPORT int luaopen_lfs (lua_State *L);
|
LFS_EXPORT int luaopen_lfs(lua_State * L);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user