[Libreoffice-commits] core.git: external/pdfium
Miklos Vajna
vmiklos at collabora.co.uk
Wed Feb 8 18:23:36 UTC 2017
external/pdfium/UnpackedTarball_pdfium.mk | 3 +
external/pdfium/macos.patch.1 | 62 ++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+)
New commits:
commit b668b90dee629cae114ef4d0e89a466b5ef906ac
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Feb 8 14:14:34 2017 +0100
pdfium: work around macOS 10.9 build
I assume this is a compiler bug, the patch can be dropped when we don't
build on this baseline anymore.
Change-Id: Ic65f830b888864db075efefd5b2e5d2520d9213e
Reviewed-on: https://gerrit.libreoffice.org/34033
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk
index 2d50729..0cad016 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -9,7 +9,10 @@
pdfium_patches :=
pdfium_patches += visibility.patch.1
+# To support MSVC 2013, upstream already moved to 2015.
pdfium_patches += msvc.patch.1
+# To support macOS 10.9 baseline.
+pdfium_patches += macos.patch.1
$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
diff --git a/external/pdfium/macos.patch.1 b/external/pdfium/macos.patch.1
new file mode 100644
index 0000000..360e54a
--- /dev/null
+++ b/external/pdfium/macos.patch.1
@@ -0,0 +1,62 @@
+diff --git a/core/fpdfapi/parser/cpdf_hint_tables.cpp b/core/fpdfapi/parser/cpdf_hint_tables.cpp
+index e000188..39fd200 100644
+--- a/core/fpdfapi/parser/cpdf_hint_tables.cpp
++++ b/core/fpdfapi/parser/cpdf_hint_tables.cpp
+@@ -150,7 +150,8 @@ bool CPDF_HintTables::ReadPageHintTable(CFX_BitStream* hStream) {
+ safeDeltaObj += dwObjLeastNum;
+ if (!safeDeltaObj.IsValid())
+ return false;
+- m_dwDeltaNObjsArray.push_back(safeDeltaObj.ValueOrDie());
++ uint32_t deltaObj = safeDeltaObj.ValueOrDie();
++ m_dwDeltaNObjsArray.push_back(deltaObj);
+ }
+ hStream->ByteAlign();
+
+@@ -166,7 +167,8 @@ bool CPDF_HintTables::ReadPageHintTable(CFX_BitStream* hStream) {
+ if (!safePageLen.IsValid())
+ return false;
+
+- dwPageLenArray.push_back(safePageLen.ValueOrDie());
++ uint32_t pageLen = safePageLen.ValueOrDie();
++ dwPageLenArray.push_back(pageLen);
+ }
+
+ int nOffsetE = GetEndOfFirstPageOffset();
+@@ -325,13 +327,15 @@ bool CPDF_HintTables::ReadSharedObjHintTable(CFX_BitStream* hStream,
+ if (!safeObjNum.IsValid())
+ return false;
+
+- m_dwSharedObjNumArray.push_back(safeObjNum.ValueOrDie());
++ uint32_t objNum = safeObjNum.ValueOrDie();
++ m_dwSharedObjNumArray.push_back(objNum);
+ if (i == m_nFirstPageSharedObjs) {
+ FX_SAFE_FILESIZE safeLoc = dwFirstSharedObjLoc;
+ if (!safeLoc.IsValid())
+ return false;
+
+- m_szSharedObjOffsetArray.push_back(safeLoc.ValueOrDie());
++ FX_FILESIZE loc = safeLoc.ValueOrDie();
++ m_szSharedObjOffsetArray.push_back(loc);
+ }
+ }
+
+@@ -341,7 +345,8 @@ bool CPDF_HintTables::ReadSharedObjHintTable(CFX_BitStream* hStream,
+ if (!safeLoc.IsValid())
+ return false;
+
+- m_szSharedObjOffsetArray.push_back(safeLoc.ValueOrDie());
++ FX_FILESIZE loc = safeLoc.ValueOrDie();
++ m_szSharedObjOffsetArray.push_back(loc);
+ }
+ }
+
+@@ -351,7 +356,8 @@ bool CPDF_HintTables::ReadSharedObjHintTable(CFX_BitStream* hStream,
+ if (!safeLoc.IsValid())
+ return false;
+
+- m_szSharedObjOffsetArray.push_back(safeLoc.ValueOrDie());
++ FX_FILESIZE loc = safeLoc.ValueOrDie();
++ m_szSharedObjOffsetArray.push_back(loc);
+ }
+
+ hStream->ByteAlign();
More information about the Libreoffice-commits
mailing list