<div dir="ltr">Follow up issue <a href="https://github.com/ocamllabs/ocaml-ctypes/issues/302" target="_blank">https://github.com/ocamllabs/ocaml-ctypes/issues/302</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 3:28 PM, Thomas Braibant <span dir="ltr"><<a href="mailto:thomas.braibant@gmail.com" target="_blank">thomas.braibant@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am ashamed by this patch, but it seems to be a functional workaround...<div><br></div><div><a href="https://github.com/cryptosense/ocaml-ctypes/commit/8be776abc7d805e1c09ca20b360607a7ff1f8fd6" target="_blank">https://github.com/cryptosense/ocaml-ctypes/commit/8be776abc7d805e1c09ca20b360607a7ff1f8fd6</a><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 3:25 PM, Jeremy Yallop <span dir="ltr"><<a href="mailto:yallop@gmail.com" target="_blank">yallop@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 13 May 2015 at 14:08, Thomas Braibant <<a href="mailto:thomas.braibant@gmail.com" target="_blank">thomas.braibant@gmail.com</a>> wrote:<br>
> On Wed, May 13, 2015 at 3:03 PM, Jeremy Yallop <<a href="mailto:yallop@gmail.com" target="_blank">yallop@gmail.com</a>> wrote:<br>
>> On 13 May 2015 at 13:51, Thomas Braibant <<a href="mailto:thomas.braibant@gmail.com" target="_blank">thomas.braibant@gmail.com</a>><br>
>> wrote:<br>
</span><span>>> > /home/vagrant/ocamlbrew/ocaml-4.02.1/.opam/4.02.1+PIC/build/ctypes.0.4.0/src/ctypes/ctypes_primitives.h:99:3:<br>
>> > error: #error "No suitable OCaml type available for representing long<br>
>> > longs"<br>
>><br>
>> That's odd. Could you post the output of the following program?<br>
><br>
</span><span>> gcc c.c<br>
> c.c: In function ‘main’:<br>
> c.c:10: error: ‘ULLONG_MAX’ undeclared (first use in this function)<br>
<br>
</span>Hmm. I didn't realise that long long support was such a recent<br>
addition to GCC. Do you know whether it supports any 64-bit integer<br>
types? If it supports int64_t and uint64_t, for example, then you<br>
might be able to get quite far with running something like this on the<br>
ctypes code:<br>
<br>
find . -name '*.c' -o -name '*.h' | xargs sed -i 's!unsigned long<br>
long!uint64_t!g; s!long long!int64_t!g; s!LLONG!INT64!g'<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>