Needed to compile Tera Term.
-- v2: include: Add _putenv_s. msvcrt: Change return type of _putenv_s to errno_t.
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/msvcrt/environ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msvcrt/environ.c b/dlls/msvcrt/environ.c index 698dc761381..83a493c1a9a 100644 --- a/dlls/msvcrt/environ.c +++ b/dlls/msvcrt/environ.c @@ -163,7 +163,7 @@ finish: /********************************************************************* * _putenv_s (MSVCRT.@) */ -int CDECL _putenv_s(const char *name, const char *value) +errno_t CDECL _putenv_s(const char *name, const char *value) { int ret;
From: Alex Henrie alexhenrie24@gmail.com
Needed to compile Tera Term. --- include/msvcrt/stdlib.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index a6e1c7eee02..c608344b115 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -178,6 +178,7 @@ _ACRTIMP int __cdecl _makepath_s(char*,size_t,const char*,const char*, _ACRTIMP size_t __cdecl _mbstrlen(const char*); _ACRTIMP _onexit_t __cdecl _onexit(_onexit_t); _ACRTIMP int __cdecl _putenv(const char*); +_ACRTIMP errno_t __cdecl _putenv_s(const char*,const char*); #ifndef _rotl _ACRTIMP unsigned int __cdecl _rotl(unsigned int,int); #endif
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=125208
Your paranoid android.
=== debian11 (build log) ===
Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24719. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24719. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24719.
On Thu Oct 20 14:56:49 2022 +0000, Alex Henrie wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/1113/diffs?diff_id=14751&start_sha=2b6e67907f98fc634ca7c505b97a6d7142d2f2a7#9bcb8d04bd5fff5610795adafbd822abdfb15b25_181_181)
Done
This merge request was approved by Piotr Caban.
The _putenv_s function needs some fixes related to return value on failure but it's not related to the patch (it should return errno instead of -1 on error).