[gdal-dev] Patch to improve libjpeg compatibility on gdal 1.11

David Weiß David.Weiss at ptvgroup.com
Tue Feb 17 07:11:03 PST 2015


Hey,

the attached patch against the 1.11 branch from svn is basically a backport from the 2.0 branch.

It fixes a namespace problem in
frmts/pcidsk/sdk/core/libjpeg_io.cpp
when building gdal against a current libjpeg version (newer than v6b, tested with v9a).

The technical reason is that libjpeg v6b typedefs boolean as int and uses macros for TRUE and FALSE, which is namespace agnostic.
Newer versions of libjpeg typedef boolean as enum with values TRUE and FALSE, which do not propagate into other namespaces.
Therefor, the use of TRUE inside C++ methods fails.

I encountered the problem when trying to build gdal 1.11.1 against libjpeg v9a.

Please review.

Thanks,
David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150217/0cdec837/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libjpeg_io.cpp.patch
Type: application/octet-stream
Size: 457 bytes
Desc: libjpeg_io.cpp.patch
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150217/0cdec837/attachment.obj>


More information about the gdal-dev mailing list