From 0f3d052af9b0d6d8bcb5d79c371cdaec99548890 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 24 Jul 2021 16:27:20 +0200 Subject: [PATCH] [CRT] Remove _fmode and _commode initialization This "initialization" copies the value of the local variable to the one exported from msvcrt, which is the same. Also there shouldn't be a local version of the variable in the first place. --- sdk/lib/crt/startup/crtexe.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sdk/lib/crt/startup/crtexe.c b/sdk/lib/crt/startup/crtexe.c index 4e6f1e4d1f6..ea9b13aaf22 100644 --- a/sdk/lib/crt/startup/crtexe.c +++ b/sdk/lib/crt/startup/crtexe.c @@ -52,13 +52,6 @@ extern void __cdecl _fpreset (void); #define SPACECHAR _T(' ') #define DQUOTECHAR _T('\"') -extern int * __MINGW_IMP_SYMBOL(_fmode); -extern int * __MINGW_IMP_SYMBOL(_commode); - -#undef _fmode -extern int _fmode; -extern int * __MINGW_IMP_SYMBOL(_commode); -#define _commode (* __MINGW_IMP_SYMBOL(_commode)) extern int _dowildcard; extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *); @@ -129,9 +122,6 @@ pre_c_init (void) __set_app_type (_CONSOLE_APP); __onexitbegin = __onexitend = (_PVFV *)(-1); - * __MINGW_IMP_SYMBOL(_fmode) = _fmode; - * __MINGW_IMP_SYMBOL(_commode) = _commode; - #ifdef WPRFLAG _wsetargv(); #else