aboutsummaryrefslogtreecommitdiff
path: root/src/lfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lfs.h')
-rw-r--r--src/lfs.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/lfs.h b/src/lfs.h
index 4587564..13b60a9 100644
--- a/src/lfs.h
+++ b/src/lfs.h
@@ -1,33 +1,34 @@
1/* 1/*
2** LuaFileSystem 2** LuaFileSystem
3** Copyright Kepler Project 2003 - 2017 (http://keplerproject.github.io/luafilesystem) 3** Copyright Kepler Project 2003 - 2020
4** (http://keplerproject.github.io/luafilesystem)
4*/ 5*/
5 6
6/* Define 'chdir' for systems that do not implement it */ 7/* Define 'chdir' for systems that do not implement it */
7#ifdef NO_CHDIR 8#ifdef NO_CHDIR
8 #define chdir(p) (-1) 9#define chdir(p) (-1)
9 #define chdir_error "Function 'chdir' not provided by system" 10#define chdir_error "Function 'chdir' not provided by system"
10#else 11#else
11 #define chdir_error strerror(errno) 12#define chdir_error strerror(errno)
12#endif 13#endif
13 14
14#ifdef _WIN32 15#ifdef _WIN32
15 #define chdir(p) (_chdir(p)) 16#define chdir(p) (_chdir(p))
16 #define getcwd(d, s) (_getcwd(d, s)) 17#define getcwd(d, s) (_getcwd(d, s))
17 #define rmdir(p) (_rmdir(p)) 18#define rmdir(p) (_rmdir(p))
18 #define LFS_EXPORT __declspec (dllexport) 19#define LFS_EXPORT __declspec (dllexport)
19 #ifndef fileno 20#ifndef fileno
20 #define fileno(f) (_fileno(f)) 21#define fileno(f) (_fileno(f))
21 #endif 22#endif
22#else 23#else
23 #define LFS_EXPORT 24#define LFS_EXPORT
24#endif 25#endif
25 26
26#ifdef __cplusplus 27#ifdef __cplusplus
27extern "C" { 28extern "C" {
28#endif 29#endif
29 30
30LFS_EXPORT int luaopen_lfs (lua_State *L); 31 LFS_EXPORT int luaopen_lfs(lua_State * L);
31 32
32#ifdef __cplusplus 33#ifdef __cplusplus
33} 34}