Changeset 1332
- Timestamp:
- 01/02/25 02:05:32 (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/virtfile/stdiofile.cpp
r1328 r1332 88 88 bool StdioFileSystem::Vstat(const char* path, Stat* out) 89 89 { 90 #if def _WIN3290 #if defined(_WIN32) && !defined(__BORLANDC__) 91 91 //under windows, there are a few choices of _statXX structures: 32bit, 64bit, ansi, widechar (and their corresponding _statXX() functions). For the future: ensure utf8 filenames work. 92 92 using stat = struct _stat64i32; //"struct" because there is also a function with the same name … … 96 96 #endif 97 97 stat info; 98 #ifdef __BORLANDC__ 99 #define _stat(a,b) stat(a,b) //embarcadero uses "stat" as struct type and "stat()" as function 100 #endif 98 101 if (_stat(path, &info) != 0) return false; 99 102 out->is_file = S_ISREG(info.st_mode); … … 108 111 bool StdioFileSystem::Vsettime(const char* path, double timestamp) 109 112 { 110 #if def _WIN32113 #if defined(_WIN32) && !defined(__BORLANDC__) 111 114 //under windows, there are a few choices of _statXX structures: 32bit, 64bit, ansi, widechar (and their corresponding _statXX() functions). For the future: ensure utf8 filenames work. 112 115 using stat = struct _stat64i32; //"struct" because there is also a function with the same name … … 117 120 stat info; 118 121 if (_stat(path, &info) != 0) return false; 122 #ifdef __BORLANDC__ // when including <utime.h> (no "sys/"), compiles OK when using both no-underscore variants, but causes "unresolved external utime()" during linking, hence need to use both underscored variants: 123 #define utimbuf _utimbuf 124 #define utime(a,b) _utime(a,b) 125 #endif 119 126 struct utimbuf times; 120 127 #if defined IPHONE && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
Note: See TracChangeset
for help on using the changeset viewer.