summaryrefslogtreecommitdiff
path: root/thirdparty/jpeg-compressor
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2020-04-21 21:12:05 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2020-04-21 21:12:09 +0200
commit1e5a93a4166858bba708b12cd62961c6bf3512a4 (patch)
treee2d3769124948c82c00bc7b837ee5431ebfd8ede /thirdparty/jpeg-compressor
parentcb1ae08c14e02ce29fb71ae40ae657f1d30a0422 (diff)
Fix compilation of jpgd.cpp on MSVC 2017
Diffstat (limited to 'thirdparty/jpeg-compressor')
-rw-r--r--thirdparty/jpeg-compressor/jpgd.cpp6
-rw-r--r--thirdparty/jpeg-compressor/patches/fix-msvc2017-build.patch31
2 files changed, 34 insertions, 3 deletions
diff --git a/thirdparty/jpeg-compressor/jpgd.cpp b/thirdparty/jpeg-compressor/jpgd.cpp
index a0c494db61..257d0b7574 100644
--- a/thirdparty/jpeg-compressor/jpgd.cpp
+++ b/thirdparty/jpeg-compressor/jpgd.cpp
@@ -2126,7 +2126,7 @@ namespace jpgd {
int jpeg_decoder::decode_next_mcu_row()
{
- if (setjmp(m_jmp_state))
+ if (::setjmp(m_jmp_state))
return JPGD_FAILED;
const bool chroma_y_filtering = ((m_flags & cFlagBoxChromaFiltering) == 0) && ((m_scan_type == JPGD_YH2V2) || (m_scan_type == JPGD_YH1V2));
@@ -3042,7 +3042,7 @@ namespace jpgd {
jpeg_decoder::jpeg_decoder(jpeg_decoder_stream* pStream, uint32_t flags)
{
- if (setjmp(m_jmp_state))
+ if (::setjmp(m_jmp_state))
return;
decode_init(pStream, flags);
}
@@ -3055,7 +3055,7 @@ namespace jpgd {
if (m_error_code)
return JPGD_FAILED;
- if (setjmp(m_jmp_state))
+ if (::setjmp(m_jmp_state))
return JPGD_FAILED;
decode_start();
diff --git a/thirdparty/jpeg-compressor/patches/fix-msvc2017-build.patch b/thirdparty/jpeg-compressor/patches/fix-msvc2017-build.patch
new file mode 100644
index 0000000000..7b338de084
--- /dev/null
+++ b/thirdparty/jpeg-compressor/patches/fix-msvc2017-build.patch
@@ -0,0 +1,31 @@
+diff --git a/thirdparty/jpeg-compressor/jpgd.cpp b/thirdparty/jpeg-compressor/jpgd.cpp
+index a0c494db61..257d0b7574 100644
+--- a/thirdparty/jpeg-compressor/jpgd.cpp
++++ b/thirdparty/jpeg-compressor/jpgd.cpp
+@@ -2126,7 +2126,7 @@ namespace jpgd {
+
+ int jpeg_decoder::decode_next_mcu_row()
+ {
+- if (setjmp(m_jmp_state))
++ if (::setjmp(m_jmp_state))
+ return JPGD_FAILED;
+
+ const bool chroma_y_filtering = ((m_flags & cFlagBoxChromaFiltering) == 0) && ((m_scan_type == JPGD_YH2V2) || (m_scan_type == JPGD_YH1V2));
+@@ -3042,7 +3042,7 @@ namespace jpgd {
+
+ jpeg_decoder::jpeg_decoder(jpeg_decoder_stream* pStream, uint32_t flags)
+ {
+- if (setjmp(m_jmp_state))
++ if (::setjmp(m_jmp_state))
+ return;
+ decode_init(pStream, flags);
+ }
+@@ -3055,7 +3055,7 @@ namespace jpgd {
+ if (m_error_code)
+ return JPGD_FAILED;
+
+- if (setjmp(m_jmp_state))
++ if (::setjmp(m_jmp_state))
+ return JPGD_FAILED;
+
+ decode_start();