Commit b94b0c11605e9fc2bcbf37fcee07548f84cfc84f

  • avatar
  • dums <dums @01b27279-081b-0410…d9d9e0fb0389.>
  • Wed Jan 02 22:05:59 CET 2008
Apply fix to avoid a console appearing while using STLport under Windows CE.

git-svn-id: https://stlport.svn.sourceforge.net/svnroot/stlport/branches/STLPORT_5_1/STLport@3360 01b27279-081b-0410-8cf9-d9d9e0fb0389
  
112008-01-02 Francois Dumont <dums@users.sourceforge.net>
22
3 * src/_stdio_file.h: Apply Windows CE fix already present in trunk to
4 avoid the famous opening console issue.
5
36 * src/fstream.cpp: #1854345 bug fixed.
47
582007-12-11 Petr Ovtchenkov <complement@users.sourceforge.net>
  
8282// Implementation for eMbedded Visual C++ 3.0 and 4.2 (.NET)
8383#if defined (_STLP_WCE)
8484
85inline int _FILE_fd(const FILE *__f) { return (int)::_fileno((FILE*)__f); }
85inline 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}
86104
87105# undef _STLP_FILE_I_O_IDENTICAL
88106