From 73a2484753cd6b2e4af673cd6dc752ba5b00c116 Mon Sep 17 00:00:00 2001 From: scottmg Date: Tue, 23 Jun 2015 13:37:08 -0700 Subject: Fix incorrect libxml fprintf, erroring on clang win x64 R=thakis@chromium.org BUG=https://bugzilla.gnome.org/show_bug.cgi?id=751410 BUG=82385 Review URL: https://codereview.chromium.org/1204813002 Cr-Commit-Position: refs/heads/master@{#335736} --- third_party/libxml/README.chromium | 1 + third_party/libxml/src/timsort.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/third_party/libxml/README.chromium b/third_party/libxml/README.chromium index 682c659..63b9cd1 100644 --- a/third_party/libxml/README.chromium +++ b/third_party/libxml/README.chromium @@ -14,6 +14,7 @@ Modifications: chromium/include/libxml/libxml_utils.h. - Import https://git.gnome.org/browse/libxml2/commit/?id=7580ce0a7f53891de520fed2c0e360266c286da6 from upstream. +- Import https://bugzilla.gnome.org/show_bug.cgi?id=751410. To import a new snapshot: diff --git a/third_party/libxml/src/timsort.h b/third_party/libxml/src/timsort.h index efa3aab..43cb1fa 100644 --- a/third_party/libxml/src/timsort.h +++ b/third_party/libxml/src/timsort.h @@ -27,6 +27,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #elif defined(WIN32) typedef __int64 int64_t; typedef unsigned __int64 uint64_t; +#if !defined(PRIuS) +#define PRIuS "Iu" +#endif #endif #endif @@ -323,7 +326,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size) SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE)); if (tempstore == NULL) { - fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); + fprintf(stderr, "Error allocating temporary storage for tim sort: need %" PRIuS " bytes", sizeof(SORT_TYPE) * new_size); exit(1); } store->storage = tempstore; -- cgit v1.1