diff options
author | tuler <tuler> | 2004-11-04 22:21:28 +0000 |
---|---|---|
committer | tuler <tuler> | 2004-11-04 22:21:28 +0000 |
commit | 963ec467311dd5dee2d698b8731499e034a7faff (patch) | |
tree | 477a920c2c559405c8600bccd9814f5a03f4da9d /src | |
parent | ccd7be19848cecd099a6747faf392e33d37e45c0 (diff) | |
download | luafilesystem-963ec467311dd5dee2d698b8731499e034a7faff.tar.gz luafilesystem-963ec467311dd5dee2d698b8731499e034a7faff.tar.bz2 luafilesystem-963ec467311dd5dee2d698b8731499e034a7faff.zip |
ifdefs por conta de problemas de compilacao no windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/lfs.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -9,7 +9,7 @@ | |||
9 | ** lfs.lock (fh, mode) | 9 | ** lfs.lock (fh, mode) |
10 | ** lfs.unlock (fh) | 10 | ** lfs.unlock (fh) |
11 | ** | 11 | ** |
12 | ** $Id: lfs.c,v 1.9 2004/11/03 10:11:18 tomas Exp $ | 12 | ** $Id: lfs.c,v 1.10 2004/11/04 22:21:28 tuler Exp $ |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <errno.h> | 15 | #include <errno.h> |
@@ -354,7 +354,11 @@ static int dir_create_meta (lua_State *L) { | |||
354 | /* | 354 | /* |
355 | ** Convert the inode protection mode to a string. | 355 | ** Convert the inode protection mode to a string. |
356 | */ | 356 | */ |
357 | #ifdef WIN32 | ||
358 | static const char *mode2string (unsigned short mode) { | ||
359 | #else | ||
357 | static const char *mode2string (mode_t mode) { | 360 | static const char *mode2string (mode_t mode) { |
361 | #endif | ||
358 | if ( S_ISREG(mode) ) | 362 | if ( S_ISREG(mode) ) |
359 | return "file"; | 363 | return "file"; |
360 | else if ( S_ISDIR(mode) ) | 364 | else if ( S_ISDIR(mode) ) |
@@ -431,6 +435,7 @@ static int file_info (lua_State *L) { | |||
431 | lua_pushliteral (L, "size"); | 435 | lua_pushliteral (L, "size"); |
432 | lua_pushnumber (L, (lua_Number)info.st_size); | 436 | lua_pushnumber (L, (lua_Number)info.st_size); |
433 | lua_rawset (L, -3); | 437 | lua_rawset (L, -3); |
438 | #ifndef WIN32 | ||
434 | /* blocks allocated for file */ | 439 | /* blocks allocated for file */ |
435 | lua_pushliteral (L, "blocks"); | 440 | lua_pushliteral (L, "blocks"); |
436 | lua_pushnumber (L, (lua_Number)info.st_blocks); | 441 | lua_pushnumber (L, (lua_Number)info.st_blocks); |
@@ -439,6 +444,7 @@ static int file_info (lua_State *L) { | |||
439 | lua_pushliteral (L, "blksize"); | 444 | lua_pushliteral (L, "blksize"); |
440 | lua_pushnumber (L, (lua_Number)info.st_blksize); | 445 | lua_pushnumber (L, (lua_Number)info.st_blksize); |
441 | lua_rawset (L, -3); | 446 | lua_rawset (L, -3); |
447 | #endif | ||
442 | 448 | ||
443 | return 1; | 449 | return 1; |
444 | } | 450 | } |