Skip to content
This repository
Browse code

fixes #14030, osx x86_64 would crash on a throw, trying to open tiffs…

…, basically cximage was referencing internal tiff headers instead of system headers, opps
  • Loading branch information...
commit 58333327bf1eafefeed0857210cc346696407d67 1 parent e28aed3
authored February 07, 2013
6  lib/cximage-6.0/CxImage/tif_xfile.cpp
@@ -11,7 +11,11 @@
11 11
 
12 12
 #if CXIMAGE_SUPPORT_TIF
13 13
 
  14
+#ifdef _LINUX
  15
+#include <tiffio.h>
  16
+#else
14 17
 #include "../tiff/tiffiop.h"
  18
+#endif
15 19
 
16 20
 #include "xfile.h"
17 21
 
@@ -92,8 +96,10 @@ _TIFFFdOpen(void* fd, const char* name, const char* mode)
92 96
 	    (thandle_t) fd,
93 97
 	    _tiffReadProcEx, _tiffWriteProcEx, _tiffSeekProcEx, _tiffCloseProcEx,
94 98
 	    _tiffSizeProcEx, _tiffMapProcEx, _tiffUnmapProcEx);
  99
+#ifndef _LINUX
95 100
 	if (tif)
96 101
 		tif->tif_fd = fd;
  102
+#endif
97 103
 	return (tif);
98 104
 }
99 105
 
2  lib/cximage-6.0/CxImage/ximatif.cpp
@@ -11,8 +11,6 @@
11 11
 
12 12
 #define FIX_16BPP_DARKIMG // + VK: if uncomment, dark 16bpp images are fixed
13 13
 
14  
-#include "../tiff/tiffio.h"
15  
-
16 14
 #define CVT(x)			(((x) * 255L) / ((1L<<16)-1))
17 15
 #define	SCALE(x)		(((x)*((1L<<16)-1))/255)
18 16
 #define CalculateLine(width,bitdepth)	(((width * bitdepth) + 7) / 8)
4  lib/cximage-6.0/CxImage/ximatif.h
@@ -23,7 +23,11 @@
23 23
 
24 24
 #if CXIMAGE_SUPPORT_TIF
25 25
 
  26
+#ifdef _LINUX
  27
+#include <tiffio.h>
  28
+#else
26 29
 #include "../tiff/tiffio.h"
  30
+#endif
27 31
 
28 32
 class DLL_EXP CxImageTIF: public CxImage
29 33
 {

1 note on commit 5833332

Memphiz
Owner

Nice catch :)

Please sign in to comment.
Something went wrong with that request. Please try again.