Closed madroach closed 4 years ago
Indeed, I would really like a solution that enables to still compile Parmap on a pre 4.06 system. Any idea on how to do this purely in OCaml? Otherwise, autoconf is the way to go.
You could use cppo (a preprocessor for OCaml).
#if OCAML_VERSION >= (4,08)
...
#else
...
#endif
Also, invoking cppo has to be dealt with in the build process.
I did it with autoconf, but if at some time more compatibility fixes are needed you may still need to switch to using cpp.
There is another fix for this proposed in https://github.com/rdicosmo/parmap/pull/88 Without a configure hack.
PS: nice hack still ;)
@madroach why the '~-1' at line 113 instead of just '-1'?
@UnixJunkie its not necessary. To be honest I don't really understand when just -
suffices and when unary ~-
is neeeded.
Are there any updates with the fix?
@rdicosmo you should accept this PR. This is a simple fix for the problem.
This is required to build on OCaml 4.08.0. Unix.map_file was available since OCaml 4.06.0. This is still more recent than anything provided by for example Debian. So is there some backwards compatibility needed?