summaryrefslogtreecommitdiff
path: root/otherlibs
Commit message (Collapse)AuthorAgeFilesLines
* Introduce and use ROOTDIR in more makefilesSébastien Hinderer2018-09-172-53/+45
|
* Move config/Makefile to Makefile.configSébastien Hinderer2018-09-174-4/+4
| | | | | | In order to prepare the transition to autoconf, this commit moves the configuration Makefile out of the config directory which will disappear and gives it the name it will have once intstalled, namely Makefile.config.
* Merge pull request #1683 from stedolan/marshal-custom-lengthDamien Doligez2018-09-145-7/+14
|\ | | | | Make marshalled Custom_tag objects store their length.
| * Add CODE_CUSTOM_FIXED for fixed-size custom serializers.Stephen Dolan2018-08-225-7/+14
| | | | | | | | | | As a space optimisation, custom serializers that always consume the same number of bytes need not send the lengths explicitly.
* | Remove space from end of FLEXLINK_ENVDavid Allsopp2018-09-072-5/+4
| |
* | Move FLEXLINK_ENV definition to Makefile.commonDavid Allsopp2018-09-072-16/+0
| |
* | Standardise setting and use of OCAML_FLEXLINKDavid Allsopp2018-09-072-8/+13
| | | | | | | | | | | | | | | | Some Makefiles were using export to set OCAML_FLEXLINK "globally" while others set a variable FLEXLINK_ENV and set the environment explicitly. All Makefiles now use FLEXLINK_ENV and also only invoke it on linking commands (rather than, for example, all invocations of ocamlopt).
* | (minor) remove unused CAMLYACC variablesGabriel Scherer2018-09-014-4/+0
| |
* | Merge pull request #1999 from toots/process_pidNicolás Ojeda Bär2018-08-284-0/+54
|\ \ | | | | | | API to retrieve high level process's PIDs
| * | Add API to retrieve high level process's PIDsRomain Beauxis2018-08-234-0/+54
| | |
* | | Deprecate Pervasives (#1605)Jérémie Dimino2018-08-274-12/+9
|/ / | | | | | | | | | | | | - inline Pervasives in Stdlib and re-add Pervasives as a deprecated module that aliases all elements of Stdlib except the stdlib modules. - remove special case for Stdlib.Pervasives in printtyp.ml
* | Merge pull request #1855 from mseri/pervasive-finallyNicolás Ojeda Bär2018-08-081-0/+14
|\ \ | | | | | | Add "finally" function to Pervasives
| * | stdlib: address @nojb review commentsMarcello Seri2018-08-071-6/+6
| | | | | | | | | | | | Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
| * | stdlib: rename try_finally to protectMarcello Seri2018-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a result of the poll in #1855. The votes at the time of commiting are: - 18 for `protect ~finally` - 12 for `try_finally ~finally` - 1 for `finally ~cleanup` - 0 for `try_finally ~always` - 0 for `try_finally ~cleanup` Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
| * | stdlib: simplify try_finally signature and implementationMarcello Seri2018-08-071-19/+5
| | | | | | | | | | | | Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
| * | stdlib: use a version of @bobot try_finallyMarcello Seri2018-08-071-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `try_finally work ~always ~exceptionally` is designed to run code in `work` that may fail with an exception, and has two kind of cleanup routines: - `always`, that must be run after **any** execution of the function (typically, freeing system resources), and - `exceptionally`, that should be run **only** if `work` or `always` failed with an exception (typically, undoing user-visible state changes that would only make sense if the function completes correctly). I had to locally re-define `rab_backtrace`, `get_raw_backtrace`, `raise_with_backtrace` because I could not refer to `Printexc`. Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
| * | stdlib: update try_finally to newer syntaxMarcello Seri2018-08-071-3/+3
| | | | | | | | | | | | Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
| * | stdlib: introduce try_finally in PervasivesMarcello Seri2018-08-071-0/+5
| | | | | | | | | | | | Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
* | | Stdlib: add Option module.Daniel Bünzli2018-08-082-1/+2
| | |
* | | Stdlib: add Result module.Daniel Bünzli2018-08-082-1/+3
|/ /
* | make alldependGabriel Scherer2018-08-063-20/+30
| |
* | dependHugo Heuzard2018-08-062-22/+20
| |
* | Fix Unix.fsync on Windows: retrieve fd outside blocking sectionNicolás Ojeda Bär2018-07-311-3/+8
| |
* | Unix fsync (#1839)Francois Berenger2018-07-317-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added otherlibs/unix/fsync.c and otherlibs/unix/unix.ml * add Unix.fsync * added otherlibs/win32unix/fsync.c * Unix.fsync for windows * big typo * Rewrite Unix.fsync stub for Windows * belts and braces: fail in the case of named pipe * Add missing include * corrected header * better ocamldoc for fsync * rm fsync.c from the UNIX_FILES list * updated Changes for Unix.fsync * Use _commit instead of FlushFileBuffers * Include <io.h>
* | Pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler (#1930)Xavier Clerc2018-07-271-2/+2
| |
* | Just some tbl things. (#1699)Gabriel Radanne2018-07-231-1/+1
| |
* | Remove the Sort module. (PR7812)whitequark2018-07-132-2/+1
| | | | | | | | | | | | It has been deprecated since 2000, shown a deprecation warning since 4.02, and Sort.merge is documented to have undefined behavior when the lists being merged are not sorted in the first place.
* | Make Printexc.get_callstack work in newly-created, native-code threads (#1895)sliquister2018-07-121-2/+2
|/ | | The `top_of_stack` field of the `th` descriptor for the new thread was initialized too late, causing `caml_top_of_stack` to be NULL when the thread starts running. The fix is to initialize `th->top_of_stack` earlier.
* install the mli files of the thread library next to its cmi/cmt/etcValentin Gatien-Baron2018-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is the diff in the installation directory, limited to the condition module: -./lib/ocaml/condition.mli ./lib/ocaml/threads/condition.cmi ./lib/ocaml/threads/condition.cmti ./lib/ocaml/threads/condition.cmx +./lib/ocaml/threads/condition.mli ./lib/ocaml/vmthreads/condition.cmi ./lib/ocaml/vmthreads/condition.cmti ./lib/ocaml/vmthreads/condition.mli and overall: @@ -1300,7 +1300,6 @@ ./lib/ocaml/complex.mli ./lib/ocaml/complex.p.cmt ./lib/ocaml/complex.p.cmx -./lib/ocaml/condition.mli ./lib/ocaml/digest.cmi ./lib/ocaml/digest.cmt ./lib/ocaml/digest.cmti @@ -1324,7 +1323,6 @@ ./lib/ocaml/ephemeron.mli ./lib/ocaml/ephemeron.p.cmt ./lib/ocaml/ephemeron.p.cmx -./lib/ocaml/event.mli ./lib/ocaml/expunge ./lib/ocaml/extract_crc ./lib/ocaml/filename.cmi @@ -1471,7 +1469,6 @@ ./lib/ocaml/moreLabels.mli ./lib/ocaml/moreLabels.p.cmt ./lib/ocaml/moreLabels.p.cmx -./lib/ocaml/mutex.mli ./lib/ocaml/nativeint.cmi ./lib/ocaml/nativeint.cmt ./lib/ocaml/nativeint.cmti @@ -1774,27 +1771,30 @@ ./lib/ocaml/sys.p.cmx ./lib/ocaml/target_camlheaderd ./lib/ocaml/target_camlheaderi -./lib/ocaml/thread.mli ./lib/ocaml/threads ./lib/ocaml/threads/condition.cmi ./lib/ocaml/threads/condition.cmti ./lib/ocaml/threads/condition.cmx +./lib/ocaml/threads/condition.mli ./lib/ocaml/threads/event.cmi ./lib/ocaml/threads/event.cmti ./lib/ocaml/threads/event.cmx +./lib/ocaml/threads/event.mli ./lib/ocaml/threads/mutex.cmi ./lib/ocaml/threads/mutex.cmti ./lib/ocaml/threads/mutex.cmx +./lib/ocaml/threads/mutex.mli ./lib/ocaml/threads/thread.cmi ./lib/ocaml/threads/thread.cmti ./lib/ocaml/threads/thread.cmx +./lib/ocaml/threads/thread.mli ./lib/ocaml/threads/threads.a ./lib/ocaml/threads/threads.cma ./lib/ocaml/threads/threads.cmxa ./lib/ocaml/threads/threadUnix.cmi ./lib/ocaml/threads/threadUnix.cmti ./lib/ocaml/threads/threadUnix.cmx -./lib/ocaml/threadUnix.mli +./lib/ocaml/threads/threadUnix.mli ./lib/ocaml/topdirs.cmi ./lib/ocaml/topdirs.cmt ./lib/ocaml/topdirs.cmti
* GPR#1061 check-typo complianceDavid Allsopp2018-07-012-2/+4
|
* Merge the asmrun and byterun directories into the runtime directorySébastien Hinderer2018-06-2812-1030/+1030
|
* Unix.link: include errno.h, correctly set feature test macroChristopher Zimmermann2018-06-261-1/+6
| | | | | | | Which is needed for the case without support for linkat as reported by Gabriel Scherer. Also set _XOPEN_SOURCE == 700 instead of testing for it. Test for availablility of linkat by looking at AT_SYMLINK_FOLLOW, which is, according to introduced in POSIX IEEE Std 1003.1-2008 for linkat.
* Add ~follow option to Unix.link (#1061)madroach2018-06-257-13/+51
| | | This allows hardlinking symlinks.
* Merge pull request #1821 from gasche/makefiles-consistent-opt-targetsGabriel Scherer2018-06-241-0/+2
|\ | | | | Makefiles: consistently offer `allopt` and `opt.opt` targets
| * makefiles: consistently offer *both* 'allopt' and 'opt.opt' targetsGabriel Scherer2018-06-071-0/+2
| | | | | | | | | | | | | | Some makefiles (lex, stdlib, otherlibs) would only offer allopt, while others (ocamldoc, tools) only offered opt.opt. It is inconvenient to have to remember which target name to use while going through various repositories.
* | Rename C compiler related build variablesSébastien Hinderer2018-06-209-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit renames a few C compiler related build variables so that they are reserved for the build system. They will then be re-introduced, but this time as user varialbes whose value can be freely customized when compiling the package, without risking to conflict with those command-line flags that are required by the build system itself. Here are the variables this commit renames: - CFLAGS -> OC_CFLAGS - CPPFLAGS -> OC_CPPFLAGS - LDFLAGS -> OC_LDFLAGS Note: before this commit the compilation of scheduler.c in otherlibs/threads was relying on make's implicit rule to compile C files. Since this commit stops using the standard variables for flags, it is necessary to introduce an explicit rule to compile C files and that makes use of the newly introduced variables.
* | Rename build variable SHAREDCCCOMPOPTS to SHAREDLIB_CFLAGSSébastien Hinderer2018-06-203-4/+4
| |
* | Merge pull request #1847 from gasche/fix-bigarray-dependGabriel Scherer2018-06-191-6/+1
|\ \ | | | | | | fix 'depend' target in otherlibs/bigarray
| * | fix 'depend' target in otherlibs/bigarrayGabriel Scherer2018-06-191-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This target has been broken by the move of bigarray C files to the runtime. Before the current PR: ``` $ make depend gcc -MM -O2 -fno-strict-aliasing -fwrapv -Wall -Werror -fno-tree-vrp -fPIC -I../unix -DIN_OCAML_BIGARRAY -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE -I../../byterun *.c | sed -e 's/\.o/.$(O)/g' > .depend gcc: error: *.c: No such file or directory gcc: fatal error: no input files ```
* | | make alldependGabriel Scherer2018-06-191-0/+5
|/ /
* | GPR#1825 check-typo complianceDavid Allsopp2018-06-141-1/+0
| |
* | Whitespace and overlong line fixes.David Allsopp2018-06-1426-65/+106
| |
* | Add checks to the conversion of Unix file descriptors to I/O channels (#1825)Xavier Leroy2018-06-144-5/+137
| | | | | | | | | | | | | | Unix.{in,out}_channel_of_descr now check that descr has stream semantics. These functions fail if the given file descriptor is not suitable for character-oriented I/O, e.g. a block device or a datagram socket. Fixes part of MPR#7238.
* | Fix over-long lines with minor re-wordingsDavid Allsopp2018-06-131-1/+2
| |
* | Fix docstring of stats.st_rdev in Unix modulesGabor Igloi2018-06-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | The st_rdev is not the minor number, it is the device ID according to the manpage of stat, which is actually the major * 256 + minor. I've replaced the old incorrect docstring with the description of st_rdev from the man page of the stat command - it looks like the implemenation of Unix.stat just puts the st_rdev returned from stat into the st_rdev field. Signed-off-by: Gabor Igloi <gabor.igloi@citrix.com>
* | Cleaning up the C code (#1812)Xavier Leroy2018-06-075-11/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running Clang 6.0 and GCC 8 with full warnings on suggests a few simple improvements and clean-ups to the C code of OCaml. This commit implements them. * Remove old-style, unprototyped function declarations It's `int f(void)`, not `int f()`. [-Wstrict-prototypes] * Be more explicit about conversions involving `float` and `double` byterun/bigarray.c, byterun/ints.c: add explicit casts to clarify the intent renamed float field of conversion union from `d` to `f`. byterun/compact.c, byterun/gc_ctrl.c: some local variables were of type `float` while all FP computations here are done in double precision; turned these variables into `double`. [-Wdouble-promotion -Wfloat-conversion] *Add explicit initialization of struct field `compare_ext` [-Wmissing-field-initializers] * Declare more functions "noreturn" [-Wmissing-noreturn] * Make CAMLassert compliant with ISO C In `e1 ? e2 : e3`, expressions `e2` and `e3` must have the same type. `e2` of type `void` and `e3` of type `int`, as in the original code, is a GNU extension. * Remove or conditionalize unused macros Some macros were defined and never used. Some other macros were always defined but conditionally used. [-Wunused-macros] * Replace some uses of `int` by more appropriate types like `intnat` On a 64-bit platform, `int` is only 32 bits and may not represent correctly the length of a string or the size of an OCaml heap block. This commit replaces a number of uses of `int` by other types that are 64-bit wide on 64-bit architectures, such as `intnat` or `uintnat` or `size_t` or `mlsize_t`. Sometimes an `intnat` was used as an `int` and is intended as a Boolean (0 or 1); then it was replaced by an `int`. There are many remaining cases where we assign a 64-bit quantity to a 32-bit `int` variable. Either I believe these cases are safe (e.g. the 64-bit quantity is the difference between two pointers within an I/O buffer, something that always fits in 32 bits), or the code change was not obvious and too risky. [-Wshorten-64-to-32] * Put `inline` before return type `static inline void f(void)` is cleaner than `static void inline f(void)`. [-Wold-style-declaration] * Unused assignment to unused parameter Looks very useless. [-Wunused-but-set-parameter]
* Unix: factor out shellygrek2018-06-032-5/+7
| | | | No change entry needed
* Merge pull request #1723 from stedolan/remove-meta-staticGabriel Scherer2018-05-281-16/+8
|\ | | | | Remove Meta.static_{alloc, free}.
| * Add an optional digest parameter to Meta.reify_bytecode.Stephen Dolan2018-04-131-6/+1
| |
| * Add LongString.blit_stringStephen Dolan2018-04-131-7/+2
| |