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
5adfd065
Commit
5adfd065
authored
Oct 26, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Avoid including Windows headers in the Mingw unicode stub.
parent
f621f8ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
winegcc.c
tools/winegcc/winegcc.c
+8
-7
No files found.
tools/winegcc/winegcc.c
View file @
5adfd065
...
...
@@ -648,16 +648,17 @@ static const char *mingw_unicode_hack( struct options *opts )
char
*
main_stub
=
get_temp_file
(
opts
->
output_name
,
".c"
);
create_file
(
main_stub
,
0644
,
"#include <stdarg.h>
\n
"
"#include <windef.h>
\n
"
"#include <winbase.h>
\n
"
"typedef unsigned short wchar_t;
\n
"
"extern void * __stdcall LoadLibraryA(const char *);
\n
"
"extern void * __stdcall GetProcAddress(void *,const char *);
\n
"
"extern int wmain( int argc, wchar_t *argv[] );
\n\n
"
"int main( int argc, char *argv[] )
\n
{
\n
"
" int wargc;
\n
"
" wchar_t **wargv, **wenv;
\n
"
"
HMODULE
msvcrt = LoadLibraryA(
\"
msvcrt.dll
\"
);
\n
"
" void
__cdecl
(*__wgetmainargs)(int *argc, wchar_t** *wargv, wchar_t** *wenvp, int expand_wildcards,
\n
"
"
int *new_mode) = (void *)
GetProcAddress( msvcrt,
\"
__wgetmainargs
\"
);
\n
"
" __wgetmainargs( &wargc, &wargv, &wenv, 0,
NULL
);
\n
"
"
void *
msvcrt = LoadLibraryA(
\"
msvcrt.dll
\"
);
\n
"
" void (*__wgetmainargs)(int *argc, wchar_t** *wargv, wchar_t** *wenvp, int expand_wildcards,
\n
"
"
int *new_mode) =
GetProcAddress( msvcrt,
\"
__wgetmainargs
\"
);
\n
"
" __wgetmainargs( &wargc, &wargv, &wenv, 0,
0
);
\n
"
" return wmain( wargc, wargv );
\n
}
\n
"
);
return
compile_to_object
(
opts
,
main_stub
,
NULL
);
}
...
...
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