mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 09:18:30 +00:00
[CRT]
- Update file.c to recent wine. (now with locking!) - implement/enable __wcserror, __wcserror_s, _access_s, _ctime32_s, _ctime64_s, _cwprintf, _fseeki64, _ftelli64, _get_osplatform, _get_output_format, _get_pgmptr, _get_wpgmptr, _get_terminate, _get_tzname, _get_unexpected, _gmtime64_s, _i64toa_s, _i64tow_s, _initterm_e, _itoa_s, _itow_s, _localtime32_s, _localtime64_s, _ltoa_s, _ltow_s, _putwch, _searchenv_s, _sopen_s, _ui64toa_s, _ui64tow_s, _vcwprintf, _vsprintf_p, _waccess_s, _wcserror, _wcserror_s, _wfopen_s, _wsopen_s, fopen_s, fprintf_s, fwprintf_s, printf_s, strerror_s, strncpy_s, strtok_s, vfprintf_s, vfwprintf_s, vprintf_s, vwprintf_s, wcscat_s, wcsncat_s, wcstok_s, wprintf_s. Most code comes from wine. - Fix __set_errno -> _set_errno and export it. - Remove unneeded files. [CRT_HEADERS] - add threadmbcinfo struct. - update some sec_api headers from mingw64 due to missing or incorrect functions. Patch by Samuel Serapion. Changes to msvcrt spec by me due to winebuild. CRLF/LF fixes. svn path=/trunk/; revision=54651
This commit is contained in:
parent
838328b1ed
commit
b30bf6de31
100 changed files with 2782 additions and 1270 deletions
|
@ -1,55 +1,55 @@
|
|||
/* taken from wine exit.c */
|
||||
#include <precomp.h>
|
||||
#include <internal/atexit.h>
|
||||
|
||||
extern void _atexit_cleanup(void);
|
||||
|
||||
struct __atexit *__atexit_ptr = 0;
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void exit(int status)
|
||||
{
|
||||
//int i;
|
||||
|
||||
/*
|
||||
if (__stdio_cleanup_hook)
|
||||
__stdio_cleanup_hook();
|
||||
for (i=0; i<djgpp_last_dtor-djgpp_first_dtor; i++)
|
||||
djgpp_first_dtor[i]();
|
||||
*/
|
||||
/* in case the program set it this way */
|
||||
_setmode(0, _O_TEXT);
|
||||
_atexit_cleanup();
|
||||
_exit(status);
|
||||
for(;;);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void _exit(int _status)
|
||||
{
|
||||
// FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload
|
||||
ExitProcess(_status);
|
||||
for(;;);
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
void _cexit( void )
|
||||
{
|
||||
_atexit_cleanup();
|
||||
// flush
|
||||
LOCK_EXIT;
|
||||
__call_atexit();
|
||||
UNLOCK_EXIT;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
void _c_exit( void )
|
||||
{
|
||||
// FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload
|
||||
// reset interup vectors
|
||||
/* All cleanup is done on DLL detach; Return to caller */
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void _exit(int exitcode)
|
||||
{
|
||||
ExitProcess(exitcode);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void exit(int exitcode)
|
||||
{
|
||||
#if 0
|
||||
HMODULE hmscoree;
|
||||
static const WCHAR mscoreeW[] = {'m','s','c','o','r','e','e',0};
|
||||
void (WINAPI *pCorExitProcess)(int);
|
||||
#endif
|
||||
WARN("exit(%d) called\n",exitcode);
|
||||
_cexit();
|
||||
#if 0
|
||||
hmscoree = GetModuleHandleW(mscoreeW);
|
||||
|
||||
if (hmscoree)
|
||||
{
|
||||
pCorExitProcess = (void*)GetProcAddress(hmscoree, "CorExitProcess");
|
||||
|
||||
if (pCorExitProcess)
|
||||
pCorExitProcess(exitcode);
|
||||
}
|
||||
#endif
|
||||
ExitProcess(exitcode);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue