Skip to content
Success

Changes

Summary

  1. Typo in stdlib/Makefile (commit: 8fe6f7a) (details)
  2. Reduce tmpheader.exe to 4-5KiB on Windows (commit: fc32943) (details)
  3. Stop using Caml_inline and CAMLnoret in headernt.c (commit: 776b993) (details)
  4. Remove unnecessary guards around unistd.h (commit: 558c630) (details)
  5. Use PATH_MAX instead of MAXPATHLEN (commit: 8769fb2) (details)
  6. Assume S_ISREG and SEEK_END (commit: a9be17f) (details)
  7. Move O_BINARY definition to "header" section (commit: 832ccfb) (details)
  8. Make caml/exec.h independent (commit: 619036a) (details)
  9. Re-order some header functions (no-op) (commit: a42453a) (details)
  10. Share error path in headernt.c (commit: b078359) (details)
  11. Unify implementation of read_size (commit: 1aa27b6) (details)
  12. headernt.c: inline run_runtime into main (commit: 9dbf642) (details)
  13. Check for errors from lseek in header.c (commit: 2f8e23f) (details)
  14. Refactor error display code (commit: dc12795) (details)
  15. header.c: close bytecode image before exec (commit: c25d75c) (details)
  16. Use execvp in header.c (as in headernt.c) (commit: 9996acb) (details)
  17. headernt: make read_runtime_path more CRTish (commit: 8fb3bc3) (details)
  18. Missing error case in headernt.c (commit: 725c900) (details)
  19. Unify the common parts of header.c and headernt.c (commit: 9b35c8d) (details)
  20. Merge stdlib/header{,nt}.c (commit: 93b7ff9) (details)
Commit 8fe6f7addd78da00cf979f415f6b13f548e1ff2a by david.allsopp
Typo in stdlib/Makefile

Affects forced recompilation of runtime-launch-info
(commit: 8fe6f7a)
The file was modifiedstdlib/Makefile (diff)
Commit fc3294370566b4a0f749addd6b9be7cd2b19a7e0 by david.allsopp
Reduce tmpheader.exe to 4-5KiB on Windows

stdlib/headernt.c was adapted in OCaml 3.00 to reduce its size by
avoiding the use of the CRT and using Windows API functions directly
(this is a well-studied trick on Windows, principally as a puzzle for
producing tiny binaries).

This got "regressed" slightly in OCaml 4.06, in the complex introduction
of wide character support for Windows, as the mingw-w64 incantation
required was unclear, so the entry point was changed to wmain, and the
size of the header increased.

By switching from wcslen (a CRT function) to lstrlen (a Win32 API
function), headernt.c again only requires kernel32.dll.

Additional flags are added for both ld (mingw-w64) and link (MSVC) to
squeeze every last byte out of tmpheader.exe. The MSVC version of the
header is once again no longer passed through strip, as this was found
to be corrupting the executable (and had never been reducing its size
anyway).
(commit: fc32943)
The file was modifiedstdlib/headernt.c (diff)
The file was modifiedstdlib/Makefile (diff)
Commit 776b993861f3b46bfb3d847e4abcd2fed9041321 by david.allsopp
Stop using Caml_inline and CAMLnoret in headernt.c

Modern C compilers are sufficiently intelligent not to need the inlining
hints!

Inline the definition from caml/misc.h for CAMLnoret.

Co-authored-by: Antonin Décimo <antonin@tarides.com>
(commit: 776b993)
The file was modifiedstdlib/headernt.c (diff)
Commit 558c630b234bf6c9da5180cdda6945b91ff6c937 by david.allsopp
Remove unnecessary guards around unistd.h

Already updated to remove the actual test in s.h, since XPG1 (1985)
required it and it is therefore part of the Single Unix
Specification (1992), but the _WIN32 guard and the loading of s.h are
unnecessary.
(commit: 558c630)
The file was modifiedstdlib/header.c (diff)
Commit 8769fb2ec80c96fa39b0da4abc504d8cfd91f7f5 by david.allsopp
Use PATH_MAX instead of MAXPATHLEN
(commit: 8769fb2)
The file was modifiedstdlib/header.c (diff)
Commit a9be17f2dfd1c38c2dfa1921e363a501090a04e3 by david.allsopp
Assume S_ISREG and SEEK_END

Defined in sys/stat.h and unistd.h respectively by the Single Unix
Specification.
(commit: a9be17f)
The file was modifiedstdlib/header.c (diff)
Commit 832ccfbc3fb9233262c7f6c1824c0ac508cd802c by david.allsopp
Move O_BINARY definition to "header" section

O_BINARY is added for maximum Cygwin compatibility, but it's not a Posix
flag.
(commit: 832ccfb)
The file was modifiedstdlib/header.c (diff)
Commit 619036af5a1280a347441f586ac8de617b83c977 by david.allsopp
Make caml/exec.h independent

Have exec.h include <stdint.h> itself. The bytecode executable header
now only depends on exec.h.
(commit: 619036a)
The file was modifiedstdlib/header.c (diff)
The file was modifiedstdlib/headernt.c (diff)
The file was modifiedruntime/caml/exec.h.in (diff)
Commit a42453ab2d8797c1148633cedd48b9a78f3cf6fd by david.allsopp
Re-order some header functions (no-op)
(commit: a42453a)
The file was modifiedstdlib/headernt.c (diff)
The file was modifiedstdlib/header.c (diff)
The file was modifiedstdlib/headernt.c (diff)
Commit 1aa27b63c7ed125fd2bda1e6e09d73eef838cb08 by david.allsopp
Unify implementation of read_size

Modernisations applied in headernt.c but not applied to header.c - use
uint32_t rather than unsigned long
(commit: 1aa27b6)
The file was modifiedstdlib/header.c (diff)
The file was modifiedstdlib/headernt.c (diff)
Commit 9dbf642346df24f14d8cd6eaa192b9e84c1c78f7 by david.allsopp
headernt.c: inline run_runtime into main
(commit: 9dbf642)
The file was modifiedstdlib/headernt.c (diff)
Commit 2f8e23f2443f90b60b7b2d49fdd90a7dad6e7f07 by david.allsopp
Check for errors from lseek in header.c
(commit: 2f8e23f)
The file was modifiedstdlib/header.c (diff)
The file was modifiedstdlib/headernt.c (diff)
The file was modifiedstdlib/header.c (diff)
Commit c25d75cf42a21a8a0a385d6e7b94da4c2c545d2e by david.allsopp
header.c: close bytecode image before exec

Leaking fd
(commit: c25d75c)
The file was modifiedstdlib/header.c (diff)
Commit 9996acb4b0551f9758b9ac939aa4f74666a4ea3a by david.allsopp
Use execvp in header.c (as in headernt.c)

Brings the behaviour of the two headers into line with each other - if
RNTM is ocamlrun on Unix, ocamlrun will now be sought in PATH.
(commit: 9996acb)
The file was modifiedstdlib/header.c (diff)
Commit 8fb3bc35de96ddd1f22b7f58c7276046688510d8 by david.allsopp
headernt: make read_runtime_path more CRTish
(commit: 8fb3bc3)
The file was modifiedstdlib/headernt.c (diff)
Commit 725c900b81d9e8feb787ab481f4958d5337e179e by david.allsopp
Missing error case in headernt.c
(commit: 725c900)
The file was modifiedstdlib/headernt.c (diff)
Commit 9b35c8d9069a861f81d2817adbc48cb95a741f9c by david.allsopp
Unify the common parts of header.c and headernt.c
(commit: 9b35c8d)
The file was modifiedstdlib/header.c (diff)
The file was modifiedstdlib/headernt.c (diff)
The file was modifiedstdlib/header.c (diff)
The file was modifiedstdlib/Makefile (diff)
The file was modifiedtestsuite/in_prefix/README.md (diff)
The file was modifiedtestsuite/tools/testLinkModes.ml (diff)
The file was removedstdlib/headernt.c