Fossil SCM
Changes to fossil_stat() so that the build works for mingw.
Commit
a7e747e58f7a02b2b4faefc2e6c7aee8b189946e
Parent
4778edd3f2c8e52…
1 file changed
+2
-4
+2
-4
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -30,18 +30,16 @@ | ||
| 30 | 30 | ** |
| 31 | 31 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 32 | 32 | ** larger than 2GB. |
| 33 | 33 | */ |
| 34 | 34 | #if defined(_WIN32) && defined(__MSVCRT__) |
| 35 | - static struct _stati64 fileStat; | |
| 36 | 35 | # define stat _stati64 |
| 37 | -#else | |
| 38 | - static struct stat fileStat; | |
| 39 | 36 | #endif |
| 40 | 37 | static int fileStatValid = 0; |
| 38 | +static struct stat fileStat; | |
| 41 | 39 | |
| 42 | -int fossil_stat(const char *zFilename, struct stat *buf){ | |
| 40 | +static int fossil_stat(const char *zFilename, struct stat *buf){ | |
| 43 | 41 | #if !defined(_WIN32) |
| 44 | 42 | if( g.allowSymlinks ){ |
| 45 | 43 | return lstat(zFilename, buf); |
| 46 | 44 | }else{ |
| 47 | 45 | return stat(zFilename, buf); |
| 48 | 46 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -30,18 +30,16 @@ | |
| 30 | ** |
| 31 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 32 | ** larger than 2GB. |
| 33 | */ |
| 34 | #if defined(_WIN32) && defined(__MSVCRT__) |
| 35 | static struct _stati64 fileStat; |
| 36 | # define stat _stati64 |
| 37 | #else |
| 38 | static struct stat fileStat; |
| 39 | #endif |
| 40 | static int fileStatValid = 0; |
| 41 | |
| 42 | int fossil_stat(const char *zFilename, struct stat *buf){ |
| 43 | #if !defined(_WIN32) |
| 44 | if( g.allowSymlinks ){ |
| 45 | return lstat(zFilename, buf); |
| 46 | }else{ |
| 47 | return stat(zFilename, buf); |
| 48 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -30,18 +30,16 @@ | |
| 30 | ** |
| 31 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 32 | ** larger than 2GB. |
| 33 | */ |
| 34 | #if defined(_WIN32) && defined(__MSVCRT__) |
| 35 | # define stat _stati64 |
| 36 | #endif |
| 37 | static int fileStatValid = 0; |
| 38 | static struct stat fileStat; |
| 39 | |
| 40 | static int fossil_stat(const char *zFilename, struct stat *buf){ |
| 41 | #if !defined(_WIN32) |
| 42 | if( g.allowSymlinks ){ |
| 43 | return lstat(zFilename, buf); |
| 44 | }else{ |
| 45 | return stat(zFilename, buf); |
| 46 |