From c5bfbb1bd28daa49a0d6c136052aea109f314f85 Mon Sep 17 00:00:00 2001 From: mascarenhas Date: Tue, 19 Feb 2008 20:08:23 +0000 Subject: fixed windows compile problem --- src/lfs.c | 4 +++- src/lfs.h | 33 +++++++++++++++++---------------- 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/lfs.c b/src/lfs.c index c0cccbc..a510408 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -16,7 +16,7 @@ ** lfs.touch (filepath [, atime [, mtime]]) ** lfs.unlock (fh) ** -** $Id: lfs.c,v 1.48 2008/02/18 03:13:50 mascarenhas Exp $ +** $Id: lfs.c,v 1.49 2008/02/19 20:08:23 mascarenhas Exp $ */ #include @@ -530,7 +530,9 @@ static void push_st_blksize (lua_State *L, struct stat *info) { #endif static void push_invalid (lua_State *L, struct stat *info) { luaL_error(L, "invalid attribute name"); +#ifndef _WIN32 info->st_blksize = 0; /* never reached */ +#endif } typedef void (*_push_function) (lua_State *L, struct stat *info); diff --git a/src/lfs.h b/src/lfs.h index 05a9571..4b52780 100644 --- a/src/lfs.h +++ b/src/lfs.h @@ -1,16 +1,17 @@ -/* -** LuaFileSystem -** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) -** -** $Id: lfs.h,v 1.4 2008/02/11 22:42:21 carregal Exp $ -*/ - -/* Define 'chdir' for systems that do not implement it */ -#ifdef NO_CHDIR -#define chdir(p) (-1) -#define chdir_error "Function 'chdir' not provided by system" -#else -#define chdir_error strerror(errno) -#endif - -int luaopen_lfs (lua_State *L); +/* +** LuaFileSystem +** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) +** +** $Id: lfs.h,v 1.5 2008/02/19 20:08:23 mascarenhas Exp $ +*/ + +/* Define 'chdir' for systems that do not implement it */ +#ifdef NO_CHDIR +#define chdir(p) (-1) +#define chdir_error "Function 'chdir' not provided by system" +#else +#define chdir_error strerror(errno) +#endif + + +int luaopen_lfs (lua_State *L); -- cgit v1.2.3-55-g6feb