aboutsummaryrefslogtreecommitdiff
path: root/src/lfs.c
diff options
context:
space:
mode:
authortuler <tuler>2006-03-07 19:07:57 +0000
committertuler <tuler>2006-03-07 19:07:57 +0000
commita60f6307d56a6fb17d43adcd819599230a34c246 (patch)
tree4ec882dbd06a4aaeb7bffdb2782b425b6b2babfa /src/lfs.c
parent7ba0f3da76c317dff4c66a2cb202d8b2f5b1e8d9 (diff)
downloadluafilesystem-a60f6307d56a6fb17d43adcd819599230a34c246.tar.gz
luafilesystem-a60f6307d56a6fb17d43adcd819599230a34c246.tar.bz2
luafilesystem-a60f6307d56a6fb17d43adcd819599230a34c246.zip
variable declaration in an _WIN32 section
Diffstat (limited to 'src/lfs.c')
-rw-r--r--src/lfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lfs.c b/src/lfs.c
index 50bdbf2..9adf0c9 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -11,7 +11,7 @@
11** lfs.touch (filepath [, atime [, mtime]]) 11** lfs.touch (filepath [, atime [, mtime]])
12** lfs.unlock (fh) 12** lfs.unlock (fh)
13** 13**
14** $Id: lfs.c,v 1.27 2005/08/18 01:00:44 tomas Exp $ 14** $Id: lfs.c,v 1.28 2006/03/07 19:07:57 tuler Exp $
15*/ 15*/
16 16
17#include <errno.h> 17#include <errno.h>
@@ -276,10 +276,12 @@ static int remove_dir (lua_State *L) {
276** Directory iterator 276** Directory iterator
277*/ 277*/
278static int dir_iter (lua_State *L) { 278static int dir_iter (lua_State *L) {
279#ifdef _WIN32
280 struct _finddata_t c_file;
281#endif
279 dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1)); 282 dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1));
280 luaL_argcheck (L, !d->closed, 1, "closed directory"); 283 luaL_argcheck (L, !d->closed, 1, "closed directory");
281#ifdef _WIN32 284#ifdef _WIN32
282 struct _finddata_t c_file;
283 if (d->hFile == 0L) { /* first entry */ 285 if (d->hFile == 0L) { /* first entry */
284 if ((d->hFile = _findfirst (d->pattern, &c_file)) == -1L) { 286 if ((d->hFile = _findfirst (d->pattern, &c_file)) == -1L) {
285 lua_pushnil (L); 287 lua_pushnil (L);