--- libgdata-0.15.2-orig/gdata/tests/streams.c 2014-05-27 22:54:44.000000000 +0200 +++ libgdata-0.15.2/gdata/tests/streams.c 2014-08-10 18:22:42.798406600 +0200 @@ -20,10 +20,22 @@ #include #include #include +#ifdef G_OS_WIN32 +#include +#include +#define htonl(_val) ( ((uint16_t)(_val) & 0xff00) >> 8 | ((uint16_t)(_val) & 0xff) << 8 ) +#define htons(_val) ( ((uint32_t)(_val) & 0xff000000) >> 24 | \ + ((uint32_t)(_val) & 0x00ff0000) >> 8 | \ + ((uint32_t)(_val) & 0x0000ff00) << 8 | \ + ((uint32_t)(_val) & 0x000000ff) << 24 ) +#else #include +#endif #include +#ifndef G_OS_WIN32 #include #include +#endif #include "gdata.h" #include "common.h" @@ -577,7 +583,7 @@ ERROR_ON_INITIAL_REQUEST = 0, ERROR_ON_SUBSEQUENT_REQUEST = 1, ERROR_ON_FINAL_REQUEST = 2, - NO_ERROR = 3, + EGG_NO_ERROR = 3, } error_type; #define UPLOAD_STREAM_RESUMABLE_MAX_ERROR_TYPE 3 } UploadStreamResumableTestParams; @@ -670,7 +676,7 @@ goto error; case ERROR_ON_SUBSEQUENT_REQUEST: case ERROR_ON_FINAL_REQUEST: - case NO_ERROR: + case EGG_NO_ERROR: /* Success. */ if (test_params->file_size == 0) { goto completion; @@ -734,7 +740,7 @@ } /* Fall through */ - case NO_ERROR: + case EGG_NO_ERROR: /* Success. */ if (server_data->next_range_start == test_params->file_size) { goto completion; @@ -919,7 +925,7 @@ g_clear_error (&error); break; - case NO_ERROR: + case EGG_NO_ERROR: /* Check we've had a successful return value */ g_assert_no_error (error); g_assert_cmpint (length_written, ==, 0);