ysulsky avatar ysulsky committed 7a5361e

bigstring: compile fixes

Comments (0)

Files changed (2)

base/core/lib/bigstring_marshal.ml

-INCLUDE "config.mlh"
-
 open Sexplib.Conv
-open Result.Export
 open Bigstring
+open Std_internal
 
 (* Marshalling to/from bigstrings *)
 
   marshal_to_gen ?buf ?flags fd v ~f:(fun fd buf ~len ->
     Bigstring.really_write fd buf ~len)
 
-IFDEF LINUX_EXT THEN
+let marshal_to_sock_no_sigpipe =
+  let f really_send_no_sigpipe
+    :  ?buf : t
+    -> ?flags : Marshal.extern_flags list
+    -> Unix.file_descr
+    -> 'a
+    -> unit
+    = fun ?buf ?flags fd v ->
+      marshal_to_gen ?buf ?flags fd v ~f:(fun fd buf ~len ->
+        really_send_no_sigpipe fd ?pos:None ?len:(Some len) buf)
+  in
+  (* Work-around for the overly-conservative value restriction *)
+  Obj.magic (Or_error.map Bigstring.really_send_no_sigpipe ~f)
 
-let marshal_to_sock_no_sigpipe ?buf ?flags fd v =
-  marshal_to_gen ?buf ?flags fd v ~f:(fun fd buf ~len ->
-    Bigstring.really_send_no_sigpipe fd buf ~len)
-
-let marshal_to_sock_no_sigpipe = Ok marshal_to_sock_no_sigpipe
-
-ELSE
-
-open Std_internal
-
-let marshal_to_sock_no_sigpipe =
-  unimplemented "Bigstring_marshal.marshal_to_sock_no_sigpipe"
-
-ENDIF

base/core/oasis.sh

 <lib{,_test}/*.ml{,i}>     : syntax_camlp4o
 "lib/backtrace.ml"         : mlh, pkg_camlp4.macro
 "lib/bigstring.ml"         : mlh, pkg_camlp4.macro
-"lib/bigstring_marshal.ml" : mlh, pkg_camlp4.macro
 "lib/core_int63.ml"        : mlh, pkg_camlp4.macro
 "lib/core_mutex.ml"        : mlh, pkg_camlp4.macro
 "lib/core_unix.ml"         : mlh, pkg_camlp4.macro
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.