aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-02-28 23:15:29 +0100
committerMax Kellermann <max@duempel.org>2015-02-28 23:15:46 +0100
commitc637b96f10e5452147751bb0e6d61cc574760f04 (patch)
tree326a286d48b802e828cf497a1603c19eead303a4
parent44b9197354dc1f69c6de6a2f4f3e5a5722d05b62 (diff)
downloadmpd-c637b96f10e5452147751bb0e6d61cc574760f04.tar.gz
mpd-c637b96f10e5452147751bb0e6d61cc574760f04.tar.xz
mpd-c637b96f10e5452147751bb0e6d61cc574760f04.zip
Win32Main: use TCHAR where appropriate
Diffstat (limited to '')
-rw-r--r--src/win32/Win32Main.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx
index 8bef63f3c..a833e7362 100644
--- a/src/win32/Win32Main.cxx
+++ b/src/win32/Win32Main.cxx
@@ -30,15 +30,16 @@
#include <atomic>
#include <windows.h>
+#include <tchar.h>
static int service_argc;
static char **service_argv;
-static char service_name[] = "";
+static TCHAR service_name[] = _T("");
static std::atomic_bool running;
static SERVICE_STATUS_HANDLE service_handle;
static void WINAPI
-service_main(DWORD argc, CHAR *argv[]);
+service_main(DWORD argc, LPTSTR argv[]);
static constexpr SERVICE_TABLE_ENTRY service_registry[] = {
{service_name, service_main},
@@ -78,7 +79,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type,
}
static void WINAPI
-service_main(gcc_unused DWORD argc, gcc_unused CHAR *argv[])
+service_main(gcc_unused DWORD argc, gcc_unused LPTSTR argv[])
{
service_handle =
RegisterServiceCtrlHandlerEx(service_name,
@@ -132,7 +133,7 @@ int win32_main(int argc, char *argv[])
if (error_code == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
/* running as console app */
running.store(false);
- SetConsoleTitle("Music Player Daemon");
+ SetConsoleTitle(_T("Music Player Daemon"));
SetConsoleCtrlHandler(console_handler, TRUE);
return mpd_main(argc, argv);
}