Adding fileno to shunt. Windows CE is broken and fileno returns a void*. Windows CE only.
This commit is contained in:
Родитель
819b50c4d3
Коммит
6b4d28d89c
|
@ -97,6 +97,17 @@
|
|||
#endif
|
||||
#define isatty mozce_isatty
|
||||
|
||||
|
||||
#ifdef fileno
|
||||
#undef fileno
|
||||
#endif
|
||||
#define fileno mozce_fileno
|
||||
|
||||
#ifdef _fileno
|
||||
#undef _fileno
|
||||
#endif
|
||||
#define _fileno mozce_fileno
|
||||
|
||||
// math.cpp
|
||||
/*
|
||||
#define fd_acos acos
|
||||
|
@ -1182,6 +1193,7 @@ extern "C" {
|
|||
// From io.cpp
|
||||
MOZCE_SHUNT_API int mozce_chmod(const char* inFilename, int inMode);
|
||||
MOZCE_SHUNT_API int mozce_isatty(int inHandle);
|
||||
MOZCE_SHUNT_API int mozce_fileno(FILE* inHandle);
|
||||
|
||||
// From mbstring.cpp
|
||||
MOZCE_SHUNT_API unsigned char* mozce_mbsinc(const unsigned char* inCurrent);
|
||||
|
|
|
@ -103,6 +103,19 @@ MOZCE_SHUNT_API int mozce_isatty(int inHandle)
|
|||
return retval;
|
||||
}
|
||||
|
||||
MOZCE_SHUNT_API int mozce_fileno(FILE* file)
|
||||
{
|
||||
MOZCE_PRECHECK
|
||||
|
||||
#ifdef DEBUG
|
||||
mozce_printf("mozce_fileno called\n");
|
||||
#endif
|
||||
|
||||
// Windows SDK is broken. _fileno should return an int, but for whatever god forsaken reason, CE returns void*.
|
||||
|
||||
return (int) _fileno(file);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче