Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
78eca968
Commit
78eca968
authored
Feb 28, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucrtbase: Add exe entry points implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
82a4e720
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
crt_main.c
dlls/msvcrt/crt_main.c
+15
-1
crt_wmain.c
dlls/msvcrt/crt_wmain.c
+15
-1
Makefile.in
dlls/ucrtbase/Makefile.in
+5
-0
No files found.
dlls/msvcrt/crt_main.c
View file @
78eca968
...
@@ -24,7 +24,12 @@
...
@@ -24,7 +24,12 @@
#ifdef __MINGW32__
#ifdef __MINGW32__
#if _MSVCR_VER >= 140
#define _UCRT
#endif
#include <stdarg.h>
#include <stdarg.h>
#include <stdlib.h>
#include <process.h>
#include <process.h>
#include "windef.h"
#include "windef.h"
...
@@ -40,10 +45,19 @@ static const IMAGE_NT_HEADERS *get_nt_header( void )
...
@@ -40,10 +45,19 @@ static const IMAGE_NT_HEADERS *get_nt_header( void )
int
__cdecl
mainCRTStartup
(
void
)
int
__cdecl
mainCRTStartup
(
void
)
{
{
int
argc
,
new_mode
=
0
,
ret
;
int
argc
,
ret
;
char
**
argv
,
**
env
;
char
**
argv
,
**
env
;
#ifdef _UCRT
_configure_narrow_argv
(
_crt_argv_unexpanded_arguments
);
_initialize_narrow_environment
();
argc
=
*
__p___argc
();
argv
=
*
__p___argv
();
env
=
_get_initial_narrow_environment
();
#else
int
new_mode
=
0
;
__getmainargs
(
&
argc
,
&
argv
,
&
env
,
0
,
&
new_mode
);
__getmainargs
(
&
argc
,
&
argv
,
&
env
,
0
,
&
new_mode
);
#endif
_set_app_type
(
get_nt_header
()
->
OptionalHeader
.
Subsystem
==
IMAGE_SUBSYSTEM_WINDOWS_GUI
?
_crt_gui_app
:
_crt_console_app
);
_set_app_type
(
get_nt_header
()
->
OptionalHeader
.
Subsystem
==
IMAGE_SUBSYSTEM_WINDOWS_GUI
?
_crt_gui_app
:
_crt_console_app
);
ret
=
main
(
argc
,
argv
,
env
);
ret
=
main
(
argc
,
argv
,
env
);
...
...
dlls/msvcrt/crt_wmain.c
View file @
78eca968
...
@@ -24,7 +24,12 @@
...
@@ -24,7 +24,12 @@
#ifdef __MINGW32__
#ifdef __MINGW32__
#if _MSVCR_VER >= 140
#define _UCRT
#endif
#include <stdarg.h>
#include <stdarg.h>
#include <stdlib.h>
#include <process.h>
#include <process.h>
#include "windef.h"
#include "windef.h"
...
@@ -40,10 +45,19 @@ static const IMAGE_NT_HEADERS *get_nt_header( void )
...
@@ -40,10 +45,19 @@ static const IMAGE_NT_HEADERS *get_nt_header( void )
int
__cdecl
wmainCRTStartup
(
void
)
int
__cdecl
wmainCRTStartup
(
void
)
{
{
int
argc
,
new_mode
=
0
,
ret
;
int
argc
,
ret
;
WCHAR
**
argv
,
**
env
;
WCHAR
**
argv
,
**
env
;
#ifdef _UCRT
_configure_wide_argv
(
_crt_argv_unexpanded_arguments
);
_initialize_wide_environment
();
argc
=
*
__p___argc
();
argv
=
*
__p___wargv
();
env
=
_get_initial_wide_environment
();
#else
int
new_mode
=
0
;
__wgetmainargs
(
&
argc
,
&
argv
,
&
env
,
0
,
&
new_mode
);
__wgetmainargs
(
&
argc
,
&
argv
,
&
env
,
0
,
&
new_mode
);
#endif
_set_app_type
(
get_nt_header
()
->
OptionalHeader
.
Subsystem
==
IMAGE_SUBSYSTEM_WINDOWS_GUI
?
_crt_gui_app
:
_crt_console_app
);
_set_app_type
(
get_nt_header
()
->
OptionalHeader
.
Subsystem
==
IMAGE_SUBSYSTEM_WINDOWS_GUI
?
_crt_gui_app
:
_crt_console_app
);
ret
=
wmain
(
argc
,
argv
,
env
);
ret
=
wmain
(
argc
,
argv
,
env
);
...
...
dlls/ucrtbase/Makefile.in
View file @
78eca968
...
@@ -7,6 +7,11 @@ PARENTSRC = ../msvcrt
...
@@ -7,6 +7,11 @@ PARENTSRC = ../msvcrt
C_SRCS
=
\
C_SRCS
=
\
console.c
\
console.c
\
cpp.c
\
cpp.c
\
crt_gccmain.c
\
crt_main.c
\
crt_winmain.c
\
crt_wmain.c
\
crt_wwinmain.c
\
ctype.c
\
ctype.c
\
data.c
\
data.c
\
dir.c
\
dir.c
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment