[Spice-devel] [PATCH 2/3] client: fix broken vs2008 build
Arnon Gilboa
agilboa at redhat.com
Thu Jan 27 04:49:47 PST 2011
ack
Alon Levy wrote:
> ---
> client/application.cpp | 2 --
> client/common.h | 11 ++++++++++-
> client/process_loop.cpp | 2 +-
> client/red_client.cpp | 4 ++++
> 4 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/client/application.cpp b/client/application.cpp
> index 95633f8..f9ed391 100644
> --- a/client/application.cpp
> +++ b/client/application.cpp
> @@ -15,8 +15,6 @@
> License along with this library; if not, see <http://www.gnu.org/licenses/>.
> */
>
> -#define __STDC_FORMAT_MACROS
> -#include <inttypes.h>
> #include "common.h"
> #ifdef WIN32
> #include <io.h>
> diff --git a/client/common.h b/client/common.h
> index bda7a19..80911d2 100644
> --- a/client/common.h
> +++ b/client/common.h
> @@ -26,7 +26,11 @@
> #include <errno.h>
> #endif
>
> -#include <spice/types.h>
> +#define __STDC_FORMAT_MACROS
> +#ifndef _WIN32
> +#include <inttypes.h>
> +#endif
> +
> #include <stdio.h>
> #include <string>
> #include <vector>
> @@ -74,6 +78,11 @@
> #define RED64
> #endif
>
> +#if defined(_WIN32) && !defined(PRIu64)
> +#define PRIu64 "I64u"
> +#endif
> +
> +#include <spice/types.h>
> #include "red_types.h"
>
> #endif
> diff --git a/client/process_loop.cpp b/client/process_loop.cpp
> index d7e6744..9a0dadc 100644
> --- a/client/process_loop.cpp
> +++ b/client/process_loop.cpp
> @@ -236,7 +236,7 @@ unsigned int TimersQueue::get_soonest_timeout()
> if (next_time <= now) {
> return 0;
> }
> - return (next_time - now);
> + return (int)(next_time - now);
> }
>
>
> diff --git a/client/red_client.cpp b/client/red_client.cpp
> index 1810593..ac04555 100644
> --- a/client/red_client.cpp
> +++ b/client/red_client.cpp
> @@ -24,6 +24,10 @@
> #include "debug.h"
> #include "marshallers.h"
>
> +#ifndef INFINITY
> +#define INFINITY HUGE
> +#endif
> +
> #ifdef __GNUC__
> typedef struct __attribute__ ((__packed__)) OldRedMigrationBegin {
> #else
>
More information about the Spice-devel
mailing list