diff options
author | Reuben Thomas <rrt@sc3d.org> | 2011-06-09 14:01:37 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2011-06-09 19:53:41 +0100 |
commit | 530c9140c7628f7062e2caff73c94e547ea0c45f (patch) | |
tree | ef6cb15541530ea6cea22999769132f43c80c70e /src | |
parent | d292b3243f90ba21450c0599b42aa89e999524ee (diff) | |
download | luafilesystem-530c9140c7628f7062e2caff73c94e547ea0c45f.tar.gz luafilesystem-530c9140c7628f7062e2caff73c94e547ea0c45f.tar.bz2 luafilesystem-530c9140c7628f7062e2caff73c94e547ea0c45f.zip |
Add trivial link_info support on Windows (using STAT_FUNC).
Diffstat (limited to 'src')
-rw-r--r-- | src/lfs.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -96,6 +96,7 @@ typedef struct dir_data { | |||
96 | #define STAT_STRUCT struct _stati64 | 96 | #define STAT_STRUCT struct _stati64 |
97 | #endif | 97 | #endif |
98 | #define STAT_FUNC _stati64 | 98 | #define STAT_FUNC _stati64 |
99 | #define LSTAT_FUNC STAT_FUNC | ||
99 | #else | 100 | #else |
100 | #define _O_TEXT 0 | 101 | #define _O_TEXT 0 |
101 | #define _O_BINARY 0 | 102 | #define _O_BINARY 0 |
@@ -743,17 +744,9 @@ static int file_info (lua_State *L) { | |||
743 | /* | 744 | /* |
744 | ** Get symbolic link information using lstat. | 745 | ** Get symbolic link information using lstat. |
745 | */ | 746 | */ |
746 | #ifndef _WIN32 | ||
747 | static int link_info (lua_State *L) { | 747 | static int link_info (lua_State *L) { |
748 | return _file_info_ (L, LSTAT_FUNC); | 748 | return _file_info_ (L, LSTAT_FUNC); |
749 | } | 749 | } |
750 | #else | ||
751 | static int link_info (lua_State *L) { | ||
752 | lua_pushboolean(L, 0); | ||
753 | lua_pushliteral(L, "symlinkattributes not supported on this platform"); | ||
754 | return 2; | ||
755 | } | ||
756 | #endif | ||
757 | 750 | ||
758 | 751 | ||
759 | /* | 752 | /* |