Win32: add open override to _tfwopen (zlib 1.2.5) (gocha)

This commit is contained in:
OV2 2011-05-07 03:11:42 +02:00
parent 7ff42c90fd
commit 0271051f41
2 changed files with 13 additions and 1 deletions

View File

@ -203,4 +203,8 @@ extern "C" int _twremove(const char *filename ) {
return _wremove(Utf8ToWide(filename));
}
extern "C" int _twopen(const char *filename, int oflag, int pmode) {
return _wopen(Utf8ToWide(filename), oflag, pmode);
}
#endif // UNICODE

View File

@ -188,6 +188,7 @@ extern "C" {
FILE *_tfwopen(const char *filename, const char *mode );
int _twremove(const char *filename );
int _twopen(const char *filename, int oflag, int pmode);
#ifdef __cplusplus
}
@ -256,7 +257,14 @@ public:
#endif // __cplusplus
#define fopen _tfwopen
#define remove _twremove
#undef remove
__forceinline int remove(const char *filename) {
return _twremove(filename);
}
#undef open
__forceinline int open(const char *filename, int oflag, int pmode) {
return _twopen(filename, oflag, pmode);
}
#endif // _TFWOPEN_H
#endif