diff options
-rw-r--r-- | src/lfs.c | 4 | ||||
-rw-r--r-- | src/lfs.h | 33 |
2 files changed, 20 insertions, 17 deletions
@@ -16,7 +16,7 @@ | |||
16 | ** lfs.touch (filepath [, atime [, mtime]]) | 16 | ** lfs.touch (filepath [, atime [, mtime]]) |
17 | ** lfs.unlock (fh) | 17 | ** lfs.unlock (fh) |
18 | ** | 18 | ** |
19 | ** $Id: lfs.c,v 1.48 2008/02/18 03:13:50 mascarenhas Exp $ | 19 | ** $Id: lfs.c,v 1.49 2008/02/19 20:08:23 mascarenhas Exp $ |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <errno.h> | 22 | #include <errno.h> |
@@ -530,7 +530,9 @@ static void push_st_blksize (lua_State *L, struct stat *info) { | |||
530 | #endif | 530 | #endif |
531 | static void push_invalid (lua_State *L, struct stat *info) { | 531 | static void push_invalid (lua_State *L, struct stat *info) { |
532 | luaL_error(L, "invalid attribute name"); | 532 | luaL_error(L, "invalid attribute name"); |
533 | #ifndef _WIN32 | ||
533 | info->st_blksize = 0; /* never reached */ | 534 | info->st_blksize = 0; /* never reached */ |
535 | #endif | ||
534 | } | 536 | } |
535 | 537 | ||
536 | typedef void (*_push_function) (lua_State *L, struct stat *info); | 538 | typedef void (*_push_function) (lua_State *L, struct stat *info); |
@@ -1,16 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | ** LuaFileSystem | 2 | ** LuaFileSystem |
3 | ** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) | 3 | ** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) |
4 | ** | 4 | ** |
5 | ** $Id: lfs.h,v 1.4 2008/02/11 22:42:21 carregal Exp $ | 5 | ** $Id: lfs.h,v 1.5 2008/02/19 20:08:23 mascarenhas Exp $ |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /* Define 'chdir' for systems that do not implement it */ | 8 | /* Define 'chdir' for systems that do not implement it */ |
9 | #ifdef NO_CHDIR | 9 | #ifdef NO_CHDIR |
10 | #define chdir(p) (-1) | 10 | #define chdir(p) (-1) |
11 | #define chdir_error "Function 'chdir' not provided by system" | 11 | #define chdir_error "Function 'chdir' not provided by system" |
12 | #else | 12 | #else |
13 | #define chdir_error strerror(errno) | 13 | #define chdir_error strerror(errno) |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | int luaopen_lfs (lua_State *L); | 16 | |
17 | int luaopen_lfs (lua_State *L); | ||