Commit b94b0c11605e9fc2bcbf37fcee07548f84cfc84f
- Diff rendering mode:
- inline
- side by side
etc/ChangeLog-5.1
(3 / 0)
|   | |||
| 1 | 1 | 2008-01-02 Francois Dumont <dums@users.sourceforge.net> | |
| 2 | 2 | ||
| 3 | * src/_stdio_file.h: Apply Windows CE fix already present in trunk to | ||
| 4 | avoid the famous opening console issue. | ||
| 5 | |||
| 3 | 6 | * src/fstream.cpp: #1854345 bug fixed. | |
| 4 | 7 | ||
| 5 | 8 | 2007-12-11 Petr Ovtchenkov <complement@users.sourceforge.net> |
src/_stdio_file.h
(19 / 1)
|   | |||
| 82 | 82 | // Implementation for eMbedded Visual C++ 3.0 and 4.2 (.NET) | |
| 83 | 83 | #if defined (_STLP_WCE) | |
| 84 | 84 | ||
| 85 | inline int _FILE_fd(const FILE *__f) { return (int)::_fileno((FILE*)__f); } | ||
| 85 | inline int _FILE_fd(const FILE *__f) | ||
| 86 | { | ||
| 87 | /* check if FILE is one of the three standard streams | ||
| 88 | We do this check first, because invoking _fileno() on one of them | ||
| 89 | causes a terminal window to be created. This also happens if you do | ||
| 90 | any IO on them, but merely retrieving the filedescriptor shouldn't | ||
| 91 | already do that. | ||
| 92 | |||
| 93 | Obviously this is pretty implementation-specific because it requires | ||
| 94 | that indeed the first three FDs are always the same, but that is not | ||
| 95 | only common but almost guaranteed. */ | ||
| 96 | for( int __fd=0; __fd!=3; ++__fd) | ||
| 97 | { | ||
| 98 | if(__f == _getstdfilex(__fd)) | ||
| 99 | return __fd; | ||
| 100 | } | ||
| 101 | |||
| 102 | return (int)::_fileno((FILE*)__f); | ||
| 103 | } | ||
| 86 | 104 | ||
| 87 | 105 | # undef _STLP_FILE_I_O_IDENTICAL | |
| 88 | 106 |

