Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dune port #574

Closed
wants to merge 56 commits into from
Closed

Dune port #574

wants to merge 56 commits into from

Conversation

rgrinberg
Copy link
Contributor

Putting this up for @avsm

@rgrinberg rgrinberg force-pushed the jbuilder-port branch 2 times, most recently from 37afedf to 3797d8e Compare September 13, 2018 08:58
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
aantron and others added 20 commits September 24, 2018 19:00
Add _opam to .gitignore for opam 2
Travis : add an OCaml 4.07 job
Eliminate uses of <complex.h> on Android.
The usage of `I` provided by "complex.h" is error-prone, e.g `double
complex z = Double_val(x) + I*(Double_val(y))` might give `NaN` as
`creal(z)` for `x = 0.0` and `y = infinity`.
`__USE_MINGW_ANSI_STDIO` must be defined before any other relevant
headers are included. This is often not guaranteed because custom
headers are added before calls to `Cstubs.write_c`. A
macro ('ctypes_printf') is introduced instead.

Background: On windows one can link again various version of the
cstlib (crt). They are all not really compatible to C99. Instead of
testing workarounds for each version, the compatibility layer of mingw
is used.
workarounds for
 - ocaml/ocaml#1535 (no dll dependency)
 - ocaml/ocaml#1528 (string_of_float format)
 - ocaml/ocaml#1479 (chdir changes environment)
The result of `Data_custom_Val(caml_alloc_custom(...))` is word
aligned. `long double` and `long double complex` are usually
bigger. Such usage is even wrong on x86/amd64. Compilers are free to
use e.g. the MOVDQA instruction, if you tell them that your pointers are
properly aligned.
avsm added a commit to avsm/dune that referenced this pull request Dec 31, 2018
The current `C_define.Type.Int` supports signed integers since
the fix in ocaml#1344. This fix meant that some C expressions cannot
be evaluated such as `sizeof(expr)` since those are not valid
in cpp.

This changeset adds a new `Uint` type switch that is expressly
for the purpose of evaluating unsigned C integers only. This
allows for constructs such as `sizeof(expr)`.

This changeset lets the Ctypes library completely use Configurator
for all of its compile-time tests (yallop/ocaml-ctypes#574)

fixes ocaml#1720

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
until ocaml/dune#1724 is resolved

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
this lets an example build, but with an extra dependency
since dune cannot track the `mt` predicates and hence doesnt
know that the `date` example depends on ctypes-foreign-unthreaded

see ocaml/dune#1724 for discussion
Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
@avsm avsm changed the title Jbuilder port Dune port Dec 31, 2018
@avsm avsm mentioned this pull request Dec 31, 2018
18 tasks
@avsm
Copy link
Contributor

avsm commented Dec 31, 2018

Closing in favour of #588 where i've rebased and documented the progress.

@avsm avsm closed this Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants