diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-08 14:14:34 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-08 18:23:15 +0000 |
commit | b668b90dee629cae114ef4d0e89a466b5ef906ac (patch) | |
tree | 96e7d6c9b1d2276b6330dd9742e2488558716357 /external | |
parent | b27324d219ea14249fcc0827658a955de54f4250 (diff) |
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@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'external')
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 3 | ||||
-rw-r--r-- | external/pdfium/macos.patch.1 | 62 |
2 files changed, 65 insertions, 0 deletions
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 2d507295a7a0..0cad0169e1b6 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 000000000000..360e54a2ca86 --- /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(); |