| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Make marshalled Custom_tag objects store their length.
|
| |
| |
| |
| |
| | |
As a space optimisation, custom serializers that always consume
the same number of bytes need not send the lengths explicitly.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| | |
|
|\ \
| | |
| | | |
API to retrieve high level process's PIDs
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
- 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
|
|\ \
| | |
| | | |
Add "finally" function to Pervasives
|
| | |
| | |
| | |
| | | |
Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`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>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
|
| | | |
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
This allows hardlinking symlinks.
|
|\
| |
| | |
Makefiles: consistently offer `allopt` and `opt.opt` targets
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| | |
| | | |
fix 'depend' target in otherlibs/bigarray
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
```
|
|/ / |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
No change entry needed
|
|\
| |
| | |
Remove Meta.static_{alloc, free}.
|
| | |
|
| | |
|