mirror of https://github.com/snes9xgit/snes9x.git
Win32: add open override to _tfwopen (zlib 1.2.5) (gocha)
This commit is contained in:
parent
7ff42c90fd
commit
0271051f41
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue