app, app-tools: Fix WinMain definition on some executables
Now, it works on both GNU compilers and MSVC.
This commit is contained in:
parent
ea53c8ecf6
commit
4af0067274
2 changed files with 16 additions and 11 deletions
|
|
@ -121,3 +121,14 @@ main (int argc,
|
|||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
int WINAPI
|
||||
WinMain (HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
return main (__argc, __argv);
|
||||
}
|
||||
#endif
|
||||
16
app/main.c
16
app/main.c
|
|
@ -918,17 +918,11 @@ main (int argc,
|
|||
* used on MSVC builds only.
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
# ifndef _stdcall
|
||||
# define _stdcall __attribute__((stdcall))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int _stdcall
|
||||
WinMain (struct HINSTANCE__ *hInstance,
|
||||
struct HINSTANCE__ *hPrevInstance,
|
||||
char *lpszCmdLine,
|
||||
int nCmdShow)
|
||||
int WINAPI
|
||||
WinMain (HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
return main (__argc, __argv);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue