summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnon Gilboa <agilboa@redhat.com>2011-05-12 12:09:51 +0300
committerArnon Gilboa <agilboa@redhat.com>2011-05-12 15:13:39 +0300
commit865c2a4f042f063c670632f2c36a9fa68e57a62f (patch)
tree697552b769fce555c89adf97ca8ead6088788053
parentc49b79397cb94dea76112c4dc24cac946749501a (diff)
client/windows: init PACKAGE_VERSION
in windows, we set PACKAGE_VERSION to the binary version since we don't have config.h as generated by linux configure
-rw-r--r--client/common.h2
-rw-r--r--client/windows/main.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/client/common.h b/client/common.h
index 30fbf79..8b4e39d 100644
--- a/client/common.h
+++ b/client/common.h
@@ -62,6 +62,8 @@
#define strcasecmp stricmp
+extern const char* PACKAGE_VERSION;
+
#else
#include <unistd.h>
#include <X11/X.h>
diff --git a/client/windows/main.cpp b/client/windows/main.cpp
index 5d6f85b..6204498 100644
--- a/client/windows/main.cpp
+++ b/client/windows/main.cpp
@@ -41,7 +41,7 @@ static void init_winsock()
}
}
-const char* version_string = "???";
+const char* PACKAGE_VERSION = "???";
static char _version_string[40];
static void init_version_string()
@@ -66,7 +66,7 @@ static void init_version_string()
(int)(file_info->dwFileVersionMS & 0x0ffff),
(int)(file_info->dwFileVersionLS >> 16),
(int)(file_info->dwFileVersionLS & 0x0ffff));
- version_string = _version_string;
+ PACKAGE_VERSION = _version_string;
}
int WINAPI WinMain(HINSTANCE hInstance,
@@ -82,7 +82,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
init_version_string();
pthread_win32_process_attach_np();
init_winsock();
- exit_val = Application::main(__argc, __argv, version_string);
+ exit_val = Application::main(__argc, __argv, PACKAGE_VERSION);
LOG_INFO("Spice client terminated (exitcode = %d)", exit_val);
} catch (Exception& e) {
LOG_ERROR("unhandle exception: %s", e.what());