Skip to content

MinGW: js_of_ocaml complains missing implementations: win_cleanup, win_handle_fd and win_startup #332

@camlspotter

Description

@camlspotter

Use of Unix.gettimeofday creates dependencies over C functions win_startup, win_cleanup and win_handle_fd.

Possible fix is to add them to unix.js:

diff --git a/runtime/unix.js b/runtime/unix.js
index a424c0d..49f2993 100644
--- a/runtime/unix.js
+++ b/runtime/unix.js
@@ -42,3 +42,19 @@ function unix_mktime(tm){
     var tm2 = unix_localtime(t);
     return [0,t,tm2];
 }
+
+//Provides: win_startup
+function win_startup()
+{
+}
+
+//Provides: win_cleanup
+function win_cleanup()
+{
+}
+
+//Provides: win_handle_fd
+function win_handle_fd(x)
+{
+  return x;
+}

I do not test win_handle_fd(). Please review it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions