summaryrefslogtreecommitdiffstats
path: root/src/winmain.cpp
blob: dc6b7e00898cfcf5b48d76779c8dd2550b0ed474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <stdlib.h>
#include <glib.h>

#ifdef G_OS_WIN32

#undef DATADIR
#include <windows.h>

extern int main (int argc, char **argv);

/* In case we build this as a windowed application */

#ifdef __GNUC__
#  ifndef _stdcall
#    define _stdcall  __attribute__((stdcall))
#  endif
#endif

int _stdcall
WinMain (struct HINSTANCE__ *hInstance,
	 struct HINSTANCE__ *hPrevInstance,
	 char               *lpszCmdLine,
	 int                 nCmdShow)
{
	int ret;
	ret = main (__argc, __argv);
	return ret;
}

#endif