Skip to content

Commit

Permalink
Remove -cc gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Aug 23, 2024
1 parent f70cc66 commit fc7f76d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/Main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let getIOModule filename =
| ".png" -> (module ODiffIO.Png.IO : ImageIO)
| ".jpg" | ".jpeg" -> (module ODiffIO.Jpg.IO : ImageIO)
| ".bmp" -> (module ODiffIO.Bmp.IO : ImageIO)
| ".tiff" -> (module ODiffIO.Tiff.IO : ImageIO)
(* | ".tiff" -> (module ODiffIO.Tiff.IO : ImageIO) *)
| f -> failwith ("This format is not supported: " ^ f)

type 'output diffResult = { exitCode : int; diff : 'output option }
Expand Down
2 changes: 1 addition & 1 deletion io/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
(public_name odiff-io)
(flags
(-w -40 -w +26))
(libraries odiff-io.png odiff-io.jpg odiff-io.bmp odiff-io.tiff))
(libraries odiff-io.png odiff-io.jpg odiff-io.bmp))
9 changes: 8 additions & 1 deletion io/tiff/ReadTiff.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define CAML_NAME_SPACE
#include <signal.h>
#include <stdio.h>

#include <caml/alloc.h>
Expand All @@ -10,6 +9,13 @@

#include <tiffio.h>

#ifdef _WIN32
#include <excpt.h> // For structured exception handling (SEH)
#include <setjmpex.h>
#include <signal.h>
#include <windows.h>
#endif

CAMLprim value read_tiff_file_to_tuple(value file) {
CAMLparam1(file);
CAMLlocal2(res, ba);
Expand All @@ -34,6 +40,7 @@ CAMLprim value read_tiff_file_to_tuple(value file) {
NULL, dims);

uint32_t *buffer = (uint32_t *)Caml_ba_data_val(ba);

if (!(TIFFReadRGBAImageOriented(image, width, height, buffer,
ORIENTATION_TOPLEFT, 0))) {
TIFFClose(image);
Expand Down

0 comments on commit fc7f76d

Please sign in to comment.