aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config4
-rw-r--r--src/lfs.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/config b/config
index 3dae91c..eca849d 100644
--- a/config
+++ b/config
@@ -11,9 +11,9 @@ LIB_OPTION= -shared #for Linux
11LIBNAME= $T.so.$V 11LIBNAME= $T.so.$V
12 12
13# Compilation directives 13# Compilation directives
14WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings 14WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic
15INCS= -I$(LUA_INC) 15INCS= -I$(LUA_INC)
16CFLAGS= $(WARN) $(INCS) 16CFLAGS= $(WARN) $(INCS)
17CC= gcc 17CC= gcc
18 18
19# $Id: config,v 1.18 2006/12/15 18:04:50 mascarenhas Exp $ 19# $Id: config,v 1.19 2007/05/15 12:58:35 tomas Exp $
diff --git a/src/lfs.c b/src/lfs.c
index 13c014e..bc763c1 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -14,7 +14,7 @@
14** lfs.touch (filepath [, atime [, mtime]]) 14** lfs.touch (filepath [, atime [, mtime]])
15** lfs.unlock (fh) 15** lfs.unlock (fh)
16** 16**
17** $Id: lfs.c,v 1.36 2007/05/08 19:23:12 carregal Exp $ 17** $Id: lfs.c,v 1.37 2007/05/15 12:58:35 tomas Exp $
18*/ 18*/
19 19
20#include <errno.h> 20#include <errno.h>
@@ -254,6 +254,8 @@ static int remove_dir (lua_State *L) {
254static int dir_iter (lua_State *L) { 254static int dir_iter (lua_State *L) {
255#ifdef _WIN32 255#ifdef _WIN32
256 struct _finddata_t c_file; 256 struct _finddata_t c_file;
257#else
258 struct dirent *entry;
257#endif 259#endif
258 dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1)); 260 dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1));
259 luaL_argcheck (L, !d->closed, 1, "closed directory"); 261 luaL_argcheck (L, !d->closed, 1, "closed directory");
@@ -279,7 +281,6 @@ static int dir_iter (lua_State *L) {
279 } 281 }
280 } 282 }
281#else 283#else
282 struct dirent *entry;
283 if ((entry = readdir (d->dir)) != NULL) { 284 if ((entry = readdir (d->dir)) != NULL) {
284 lua_pushstring (L, entry->d_name); 285 lua_pushstring (L, entry->d_name);
285 return 1; 286 return 1;