From 8f7efe92b771568ef7da4610121f6839bf074ddc Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Mon, 31 Dec 2018 16:29:15 +0000 Subject: [PATCH] use @chris00 fix to configurator instead of mine as seen in https://github.com/ocaml/dune/pull/1726 --- src/configure/gen_c_primitives.ml | 2 +- src/ctypes-foreign-base/config/gen_libffi_abi.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure/gen_c_primitives.ml b/src/configure/gen_c_primitives.ml index d0ed0541..f768601f 100644 --- a/src/configure/gen_c_primitives.ml +++ b/src/configure/gen_c_primitives.ml @@ -107,7 +107,7 @@ let includes = [] let () = C.main ~name:"ctypes" (fun c -> let import_int l = - match C.C_define.(import c ~prelude ~includes [l,Type.Uint]) with + match C.C_define.(import c ~prelude ~includes [l,Type.Int]) with |[_,C.C_define.Value.Int i] -> i |_ -> failwith ("unable to find integer definition for " ^ l) in let import_string l = diff --git a/src/ctypes-foreign-base/config/gen_libffi_abi.ml b/src/ctypes-foreign-base/config/gen_libffi_abi.ml index 14fa1749..5fd7a0b1 100644 --- a/src/ctypes-foreign-base/config/gen_libffi_abi.ml +++ b/src/ctypes-foreign-base/config/gen_libffi_abi.ml @@ -75,7 +75,7 @@ let find_defined_symbols c c_flags = else acc) [] symbols let get_symbol c c_flags symbol = - match CD.(import c ~includes ~c_flags [symbol,Type.Uint]) with + match CD.(import c ~includes ~c_flags [symbol,Type.Int]) with |[_,CD.Value.Int i] -> i |_ -> failwith (Printf.sprintf "unexpected error parsing ffi.h: is %s not an integer?" symbol)