[Spice-commits] Branch '0.8' - client/common.h client/windows

Arnon Gilboa agilboa at kemper.freedesktop.org
Tue May 24 02:30:02 PDT 2011


 client/common.h         |    2 ++
 client/windows/main.cpp |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 31358b640be13c3b0955fc9acc1ad9526cc280ec
Author: Arnon Gilboa <agilboa at redhat.com>
Date:   Tue May 24 12:29:13 2011 +0300

    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

diff --git a/client/common.h b/client/common.h
index 522f22b..130a7bd 100644
--- a/client/common.h
+++ b/client/common.h
@@ -50,6 +50,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 a85acec..99998af 100644
--- a/client/windows/main.cpp
+++ b/client/windows/main.cpp
@@ -38,7 +38,7 @@ static void init_winsock()
     }
 }
 
-char* version_string = "???";
+const char* PACKAGE_VERSION = "???";
 static char _version_string[40];
 
 static void init_version_string()
@@ -63,7 +63,7 @@ static void init_version_string()
         file_info->dwFileVersionMS & 0x0ffff,
         file_info->dwFileVersionLS >> 16,
         file_info->dwFileVersionLS & 0x0ffff);
-    version_string = _version_string;
+    PACKAGE_VERSION = _version_string;
 }
 
 int WINAPI WinMain(HINSTANCE hInstance,
@@ -79,7 +79,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());


More information about the Spice-commits mailing list