diff options
| -rw-r--r-- | src/lfs.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -16,10 +16,16 @@ | |||
| 16 | ** lfs.touch (filepath [, atime [, mtime]]) | 16 | ** lfs.touch (filepath [, atime [, mtime]]) |
| 17 | ** lfs.unlock (fh) | 17 | ** lfs.unlock (fh) |
| 18 | ** | 18 | ** |
| 19 | ** $Id: lfs.c,v 1.53 2008/05/07 19:06:37 carregal Exp $ | 19 | ** $Id: lfs.c,v 1.54 2008/07/31 19:34:22 carregal Exp $ |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #define _LARGEFILE64_SOURCE | 22 | #ifndef _WIN32 |
| 23 | #ifndef _AIX | ||
| 24 | #define _FILE_OFFSET_BITS 64 /* Linux, Solaris and HP-UX */ | ||
| 25 | #else | ||
| 26 | #define _LARGE_FILES 1 /* AIX */ | ||
| 27 | #endif | ||
| 28 | #endif | ||
| 23 | 29 | ||
| 24 | #include <errno.h> | 30 | #include <errno.h> |
| 25 | #include <stdio.h> | 31 | #include <stdio.h> |
| @@ -82,16 +88,10 @@ typedef struct dir_data { | |||
| 82 | #define _O_BINARY 0 | 88 | #define _O_BINARY 0 |
| 83 | #define lfs_setmode(L,file,m) ((void)((void)file,m), \ | 89 | #define lfs_setmode(L,file,m) ((void)((void)file,m), \ |
| 84 | luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1) | 90 | luaL_error(L, LUA_QL("setmode") " not supported on this platform"), -1) |
| 85 | #ifdef HAVE_STAT64 | ||
| 86 | #define STAT_STRUCT struct stat64 | ||
| 87 | #define STAT_FUNC stat64 | ||
| 88 | #define LSTAT_FUNC lstat64 | ||
| 89 | #else | ||
| 90 | #define STAT_STRUCT struct stat | 91 | #define STAT_STRUCT struct stat |
| 91 | #define STAT_FUNC stat | 92 | #define STAT_FUNC stat |
| 92 | #define LSTAT_FUNC lstat | 93 | #define LSTAT_FUNC lstat |
| 93 | #endif | 94 | #endif |
| 94 | #endif | ||
| 95 | 95 | ||
| 96 | /* | 96 | /* |
| 97 | ** This function changes the working (current) directory | 97 | ** This function changes the working (current) directory |
