https://git.reactos.org/?p=reactos.git;a=commitdiff;h=296e07b94d79b9e6fec3b…
commit 296e07b94d79b9e6fec3b05de26c4afad3b1f4e1
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Jul 25 15:15:04 2021 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Wed Aug 4 02:03:07 2021 +0200
[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
---
dll/win32/msvcrt/stubs.c | 2 +-
sdk/lib/crt/misc/amsg.c | 7 ++-----
sdk/lib/crt/misc/environ.c | 2 +-
sdk/lib/crt/string/strerror.c | 2 +-
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/dll/win32/msvcrt/stubs.c b/dll/win32/msvcrt/stubs.c
index 72b32222091..389bc11f3ed 100644
--- a/dll/win32/msvcrt/stubs.c
+++ b/dll/win32/msvcrt/stubs.c
@@ -10,7 +10,7 @@ int __get_app_type()
return 0;
}
-int _fileinfo = 0;
+int _fileinfo = -1;
void *
__p__fileinfo()
diff --git a/sdk/lib/crt/misc/amsg.c b/sdk/lib/crt/misc/amsg.c
index 9c53ee118ec..2a1337f8cec 100644
--- a/sdk/lib/crt/misc/amsg.c
+++ b/sdk/lib/crt/misc/amsg.c
@@ -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
diff --git a/sdk/lib/crt/misc/environ.c b/sdk/lib/crt/misc/environ.c
index 975ab521f43..8248570ad1f 100644
--- a/sdk/lib/crt/misc/environ.c
+++ b/sdk/lib/crt/misc/environ.c
@@ -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)
diff --git a/sdk/lib/crt/string/strerror.c b/sdk/lib/crt/string/strerror.c
index a583c22c7bd..10bda6c746f 100644
--- a/sdk/lib/crt/string/strerror.c
+++ b/sdk/lib/crt/string/strerror.c
@@ -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.@)