[CRT] Fix some data exports

* Fix initialization of _commode. In msvcrt it is allocated from .bss, i.e. initialized with 0.
* _fileinfo is initialized with -1
* _aexit_rtn is a pointer, not a function
* Fix _sys_nerr
This commit is contained in:
Timo Kreuzer 2021-07-25 15:15:04 +02:00
parent 5f548654f4
commit 296e07b94d
4 changed files with 5 additions and 8 deletions

View file

@ -10,7 +10,7 @@ int __get_app_type()
return 0;
}
int _fileinfo = 0;
int _fileinfo = -1;
void *
__p__fileinfo()

View file

@ -35,11 +35,8 @@ static char *__rt_err_msg[] =
/*
* @implemented
*/
int _aexit_rtn(int exitcode)
{
_exit(exitcode);
return 0;
}
typedef void (*aexit_t)(int);
aexit_t _aexit_rtn = _exit;
/*
* @implemented

View file

@ -28,7 +28,7 @@ char *_pgmptr = NULL; /* pointer to program name */
#undef _wpgmptr
wchar_t *_wpgmptr = NULL; /* pointer to program name */
int __app_type = _UNKNOWN_APP; /* application type */
int _commode = _IOCOMMIT;
int _commode;
int BlockEnvToEnvironA(void)

View file

@ -76,7 +76,7 @@ __syserr35, __syserr36, __syserr37, __syserr38, __syserr39,
__syserr40, __syserr41, __syserr42
};
int _sys_nerr = sizeof(_sys_errlist) / sizeof(_sys_errlist[0]) - 1;
int _sys_nerr = sizeof(_sys_errlist) / sizeof(_sys_errlist[0]);
/*********************************************************************
* strerror (MSVCRT.@)