ocaml-community / ocaml-mariadb

OCaml bindings to MariaDB, supporting the nonblocking API
55 stars 18 forks source link

Fix compilation on 32bit platforms #37

Closed kit-ty-kate closed 3 years ago

kit-ty-kate commented 3 years ago

Would previously fail with:

# + /home/opam/.opam/4.11/bin/ocamlfind ocamlc -c -g -annot -bin-annot -I bindings -ccopt -I -ccopt /home/opam/.opam/4.11/lib/ctypes -warn-error +1..45 -package unix -package ctypes.stubs -I lib -I bindings -o lib/ffi_generated_types.cmo lib/ffi_generated_types.ml
# File "lib/ffi_generated_types.ml", line 154, characters 4-15:
# 154 |     -2147483648
#           ^^^^^^^^^^^
# Error: Integer literal exceeds the range of representable integers of type int

as CLIENT_REMEMBER_OPTIONS is set to -2147483648 (Int32.min_int) and int (being 31bits) is not enough to store this.