Commits

camlspotter  committed a59a729 Merge

merge

  • Participants
  • Parent commits 30cafb8, e4e7c50

Comments (0)

Files changed (4)

File opam/camlimages.4.1.1/opam

 ]
 depends: ["ocamlfind" "base-unix" "omake"]
 depopts: ["lablgtk"]
-
+ocaml-version: [>= "4.00.1"]
 homepage: "https://bitbucket.org/camlspotter/camlimages"
 license: "LGPL-2 with OCaml linking exception"
 authors: [

File opam/template/opam

 ]
 depends: ["ocamlfind" "base-unix" "omake"]
 depopts: ["lablgtk"]
-
+ocaml-version: [>= "4.00.1"]
 homepage: "https://bitbucket.org/camlspotter/camlimages"
 license: "LGPL-2 with OCaml linking exception"
 authors: [

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>