[PATCH v2 05/22] ucrtbase: Add stub functions for narrow environment

Martin Storsjo martin at martin.st
Mon Aug 3 14:26:04 CDT 2015


The interface is taken from ucrt public headers.

These are required for a plain empty exe that is built with dynamic
C runtime with MSVC 2015 to start up.
---
 dlls/msvcrt/data.c          | 26 ++++++++++++++++++++++++++
 dlls/ucrtbase/ucrtbase.spec |  6 +++---
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c
index e6989f1..7b6216d 100644
--- a/dlls/msvcrt/data.c
+++ b/dlls/msvcrt/data.c
@@ -640,3 +640,29 @@ void CDECL MSVCRT___set_app_type(int app_type)
   TRACE("(%d) %s application\n", app_type, app_type == 2 ? "Gui" : "Console");
   MSVCRT_app_type = app_type;
 }
+
+/*********************************************************************
+ *		_get_initial_narrow_environment (MSVCRT.@)
+ */
+char** CDECL _get_initial_narrow_environment(void)
+{
+  return MSVCRT___argv;
+}
+
+/*********************************************************************
+ *		_configure_narrow_argv (MSVCRT.@)
+ */
+int CDECL _configure_narrow_argv(int mode)
+{
+  TRACE("(%d)\n", mode);
+  return 0;
+}
+
+/*********************************************************************
+ *		_initialize_narrow_environment (MSVCRT.@)
+ */
+int CDECL _initialize_narrow_environment(void)
+{
+  TRACE("\n");
+  return 0;
+}
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index bcbfeaa..1ab1d7b 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -221,7 +221,7 @@
 @ cdecl _close(long) MSVCRT__close
 @ cdecl _commit(long) MSVCRT__commit
 @ cdecl _configthreadlocale(long)
-@ stub _configure_narrow_argv
+@ cdecl _configure_narrow_argv(long)
 @ stub _configure_wide_argv
 @ cdecl _control87(long long)
 @ cdecl _controlfp(long long)
@@ -354,7 +354,7 @@
 @ cdecl _get_errno(ptr)
 @ cdecl _get_fmode(ptr) MSVCRT__get_fmode
 @ cdecl _get_heap_handle()
-@ stub _get_initial_narrow_environment
+@ cdecl _get_initial_narrow_environment()
 @ stub _get_initial_wide_environment
 @ cdecl _get_invalid_parameter_handler()
 @ stub _get_narrow_winmain_command_line
@@ -407,7 +407,7 @@
 @ cdecl _i64toa_s(int64 ptr long long) MSVCRT__i64toa_s
 @ cdecl _i64tow(int64 ptr long) ntdll._i64tow
 @ cdecl _i64tow_s(int64 ptr long long) MSVCRT__i64tow_s
-@ stub _initialize_narrow_environment
+@ cdecl _initialize_narrow_environment()
 @ stub _initialize_onexit_table
 @ stub _initialize_wide_environment
 @ cdecl _initterm(ptr ptr)
-- 
2.3.2.223.g7a9409c




More information about the wine-patches mailing list