[Spice-devel] [PATCH 1/6] client/windows: init PACKAGE_VERSION

Christophe Fergeau cfergeau at redhat.com
Thu May 12 07:05:36 PDT 2011


On Thu, May 12, 2011 at 12:37:26PM +0300, Arnon Gilboa wrote:
> in windows, we set PACKAGE_VERSION to the binary version
> since we don't have config.h as generated by linux configure

ACK

Christophe
> ---
>  client/common.h         |    2 ++
>  client/windows/main.cpp |    6 +++---
>  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());
> -- 
> 1.7.4.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110512/df942f84/attachment.pgp>


More information about the Spice-devel mailing list