Commits

camlspotter committed fd4ba73 Merge

merge with 4.1.1

  • Participants
  • Parent commits 30cafb8, d3db291

Comments (0)

Files changed (2)

File src/tiffread.c

 
 #include "oversized.h"
 
-/* These are defined both in caml/config.h and in tiff.h */
+// This is to resolve the conflict of these int types in caml/config.h and tiff.h
+// Replace all the occurrences of (u?int[0-9]+) by $1_tiff, tiff.h's int types have
+// now different names from caml's.
 #undef int16
 #undef uint16
 #undef int32
 #undef uint32
 #undef int64
 #undef uint64
+#define int16 int16_tiff
+#define uint16 uint16_tiff
+#define int32 int32_tiff
+#define uint32 uint32_tiff
+#define int64 int64_tiff
+#define uint64 uint64_tiff
 
 #include <tiffio.h>
 

File src/tiffwrite.c

 #include <caml/memory.h>
 #include <caml/fail.h>
 
-/* These are defined both in caml/config.h and in tiff.h */
+// This is to resolve the conflict of these int types in caml/config.h and tiff.h
+// Replace all the occurrences of (u?int[0-9]+) by $1_tiff, tiff.h's int types have
+// now different names from caml's.
 #undef int16
 #undef uint16
 #undef int32
 #undef uint32
 #undef int64
 #undef uint64
+#define int16 int16_tiff
+#define uint16 uint16_tiff
+#define int32 int32_tiff
+#define uint32 uint32_tiff
+#define int64 int64_tiff
+#define uint64 uint64_tiff
 
 #include <tiffio.h>