aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon-svc
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-06-05 13:10:43 +0200
committerMartin Willi <martin@revosec.ch>2014-06-06 16:28:28 +0200
commitcab59c73fc616c23bf510dd875363da08ce1850c (patch)
tree1fff8a93e0451fb8ef6a17de09a4e264559d3e62 /src/charon-svc
parentbd19e27ae3295f224bf568d0b7d625a5c6bae8b8 (diff)
downloadstrongswan-cab59c73fc616c23bf510dd875363da08ce1850c.tar.bz2
strongswan-cab59c73fc616c23bf510dd875363da08ce1850c.tar.xz
windows: Use WINAPI call convention for Windows API callbacks
For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI.
Diffstat (limited to 'src/charon-svc')
-rw-r--r--src/charon-svc/charon-svc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/charon-svc/charon-svc.c b/src/charon-svc/charon-svc.c
index ff5d5de49..03cbdb871 100644
--- a/src/charon-svc/charon-svc.c
+++ b/src/charon-svc/charon-svc.c
@@ -48,8 +48,8 @@ extern void (*dbg) (debug_t group, level_t level, char *fmt, ...);
/**
* Forward declaration
*/
-static DWORD service_handler(DWORD dwControl, DWORD dwEventType,
- LPVOID lpEventData, LPVOID lpContext);
+static DWORD WINAPI service_handler(DWORD dwControl, DWORD dwEventType,
+ LPVOID lpEventData, LPVOID lpContext);
/**
* Logging hook for library logs, using stderr output
@@ -111,7 +111,7 @@ static void update_status(DWORD state)
/**
* Control handler for console
*/
-static BOOL console_handler(DWORD dwCtrlType)
+static BOOL WINAPI console_handler(DWORD dwCtrlType)
{
switch (dwCtrlType)
{
@@ -135,8 +135,8 @@ static BOOL console_handler(DWORD dwCtrlType)
/**
* Service handler function
*/
-static DWORD service_handler(DWORD dwControl, DWORD dwEventType,
- LPVOID lpEventData, LPVOID lpContext)
+static DWORD WINAPI service_handler(DWORD dwControl, DWORD dwEventType,
+ LPVOID lpEventData, LPVOID lpContext)
{
switch (dwControl)
{
@@ -285,7 +285,7 @@ static bool switch_workingdir()
/**
* Service main routine when running as service
*/
-static void service_main(DWORD dwArgc, LPTSTR *lpszArgv)
+static void WINAPI service_main(DWORD dwArgc, LPTSTR *lpszArgv)
{
memset(&status, 0, sizeof(status));
status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;