aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch')
-rw-r--r--vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch b/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch
new file mode 100644
index 0000000..270331e
--- /dev/null
+++ b/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch
@@ -0,0 +1,31 @@
+diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
+index a9fcf0e..b1f7b32 100644
+--- a/Source/FreeImage/PluginTIFF.cpp
++++ b/Source/FreeImage/PluginTIFF.cpp
+@@ -258,7 +258,7 @@ static void
+ msdosWarningHandler(const char* module, const char* fmt, va_list ap) {
+ }
+
+-TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler;
++//TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler;
+
+ static void
+ msdosErrorHandler(const char* module, const char* fmt, va_list ap) {
+@@ -273,7 +273,7 @@ msdosErrorHandler(const char* module, const char* fmt, va_list ap) {
+ */
+ }
+
+-TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler;
++//TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler;
+
+ // ----------------------------------------------------------
+
+@@ -2659,6 +2659,8 @@ InitTIFF(Plugin *plugin, int format_id) {
+ // Set up the callback for extended TIFF directory tag support (see XTIFF.cpp)
+ // Must be called before using libtiff
+ XTIFFInitialize();
++ TIFFSetWarningHandler(msdosWarningHandler);
++ TIFFSetErrorHandler(msdosErrorHandler);
+
+ plugin->format_proc = Format;
+ plugin->description_proc = Description;