4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-30 02:50:25 +08:00

* crt1.c (_mingw32_init_fmode): Set *_imp___fmode_dll to

_fmode if not __MSVCRT__.
This commit is contained in:
Danny Smith 2004-04-01 10:04:04 +00:00
parent 54aefcc6bc
commit 4fc406c935
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-04-01 Danny Smith <dannysmith@users.sourceforge.net>
* crt1.c (_mingw32_init_fmode): Set *_imp___fmode_dll to
_fmode if not __MSVCRT__.
2004-03-30 Danny Smith <dannysmith@users.sourceforge.net>
* include/io.h: (_findfirst): Correct prototype.

View File

@ -68,7 +68,9 @@ __MINGW_IMPORT void __set_app_type(int);
/* Override the dllimport'd declarations in stdlib.h */
#undef _fmode
extern int _fmode;
#ifdef __MSVCRT__
extern int* __p__fmode(void); /* To access the dll _fmode */
#endif
/*
* Setup the default file handles to have the _CRT_fmode mode, as well as
@ -106,7 +108,11 @@ _mingw32_init_fmode ()
}
/* Now sync the dll _fmode to the one for this .exe. */
#ifdef __MSVCRT__
*__p__fmode() = _fmode;
#else
*_imp___fmode_dll = _fmode;
#endif
}