Permalink
Browse files

Adapt to newer versions of dependencies

  • Loading branch information...
1 parent 636cbff commit 02712226e9191a24fd362b8e2b614e3d9ea85432 @andrenth committed Jul 20, 2016
View
16 _oasis
@@ -13,9 +13,7 @@ Library "release"
Path: lib/release
BuildDepends: str,
unix,
- uint.uint32 (>= 1.0.1),
- uint.uint64 (>= 1.0.1),
- uint.uint128 (>= 1.0.1)
+ stdint
CompiledObject: best
Modules: Release,
Release_future
@@ -62,8 +60,8 @@ Library "release-lwt"
FindlibName: lwt
FindlibParent: release
Path: lib/lwt
- BuildDepends: lwt (= 2.4.6),
- lwt.unix (= 2.4.6),
+ BuildDepends: lwt (>= 2.5.0),
+ lwt.unix (>= 2.5.0),
release
CompiledObject: best
Modules: Release_lwt
@@ -140,14 +138,6 @@ Executable "lwt_test_helper"
BuildDepends: release.lwt,
str
-Executable "lwt_test_worker"
- Path: lib_test/lwt
- MainIs: worker.ml
- Install: false
- CompiledObject: best
- BuildDepends: release.lwt,
- str
-
Executable "lwt_masterctl"
Path: lib_test/lwt
MainIs: masterctl.ml
View
80 _tags
@@ -1,5 +1,5 @@
# OASIS_START
-# DO NOT EDIT (digest: 690a6307b84edd6011d308183ef98a1d)
+# DO NOT EDIT (digest: 63c3a0be7b4fc52e019187af8f70e484)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
@@ -16,182 +16,138 @@ true: annot, bin_annot
"_darcs": not_hygienic
# Library release
"lib/release/release.cmxs": use_release
+<lib/release/*.ml{,i,y}>: pkg_stdint
<lib/release/*.ml{,i,y}>: pkg_str
-<lib/release/*.ml{,i,y}>: pkg_uint.uint128
-<lib/release/*.ml{,i,y}>: pkg_uint.uint32
-<lib/release/*.ml{,i,y}>: pkg_uint.uint64
<lib/release/*.ml{,i,y}>: pkg_unix
# Library release-async
"lib/async/release-async.cmxs": use_release-async
<lib/async/*.ml{,i,y}>: pkg_async
<lib/async/*.ml{,i,y}>: pkg_async_extended
+<lib/async/*.ml{,i,y}>: pkg_stdint
<lib/async/*.ml{,i,y}>: pkg_str
<lib/async/*.ml{,i,y}>: pkg_threads
-<lib/async/*.ml{,i,y}>: pkg_uint.uint128
-<lib/async/*.ml{,i,y}>: pkg_uint.uint32
-<lib/async/*.ml{,i,y}>: pkg_uint.uint64
<lib/async/*.ml{,i,y}>: pkg_unix
<lib/async/*.ml{,i,y}>: use_release
# Library release-lwt
"lib/lwt/release-lwt.cmxs": use_release-lwt
<lib/lwt/*.ml{,i,y}>: pkg_lwt
<lib/lwt/*.ml{,i,y}>: pkg_lwt.unix
+<lib/lwt/*.ml{,i,y}>: pkg_stdint
<lib/lwt/*.ml{,i,y}>: pkg_str
-<lib/lwt/*.ml{,i,y}>: pkg_uint.uint128
-<lib/lwt/*.ml{,i,y}>: pkg_uint.uint32
-<lib/lwt/*.ml{,i,y}>: pkg_uint.uint64
<lib/lwt/*.ml{,i,y}>: pkg_unix
<lib/lwt/*.ml{,i,y}>: use_release
# Executable async_test_master
<lib_test/async/master.{native,byte}>: pkg_async
<lib_test/async/master.{native,byte}>: pkg_async_extended
+<lib_test/async/master.{native,byte}>: pkg_stdint
<lib_test/async/master.{native,byte}>: pkg_str
<lib_test/async/master.{native,byte}>: pkg_threads
-<lib_test/async/master.{native,byte}>: pkg_uint.uint128
-<lib_test/async/master.{native,byte}>: pkg_uint.uint32
-<lib_test/async/master.{native,byte}>: pkg_uint.uint64
<lib_test/async/master.{native,byte}>: pkg_unix
<lib_test/async/master.{native,byte}>: use_release
<lib_test/async/master.{native,byte}>: use_release-async
# Executable async_test_slave
<lib_test/async/slave.{native,byte}>: pkg_async
<lib_test/async/slave.{native,byte}>: pkg_async_extended
+<lib_test/async/slave.{native,byte}>: pkg_stdint
<lib_test/async/slave.{native,byte}>: pkg_str
<lib_test/async/slave.{native,byte}>: pkg_threads
-<lib_test/async/slave.{native,byte}>: pkg_uint.uint128
-<lib_test/async/slave.{native,byte}>: pkg_uint.uint32
-<lib_test/async/slave.{native,byte}>: pkg_uint.uint64
<lib_test/async/slave.{native,byte}>: pkg_unix
<lib_test/async/slave.{native,byte}>: use_release
<lib_test/async/slave.{native,byte}>: use_release-async
# Executable async_test_helper
<lib_test/async/helper.{native,byte}>: pkg_async
<lib_test/async/helper.{native,byte}>: pkg_async_extended
+<lib_test/async/helper.{native,byte}>: pkg_stdint
<lib_test/async/helper.{native,byte}>: pkg_str
<lib_test/async/helper.{native,byte}>: pkg_threads
-<lib_test/async/helper.{native,byte}>: pkg_uint.uint128
-<lib_test/async/helper.{native,byte}>: pkg_uint.uint32
-<lib_test/async/helper.{native,byte}>: pkg_uint.uint64
<lib_test/async/helper.{native,byte}>: pkg_unix
<lib_test/async/helper.{native,byte}>: use_release
<lib_test/async/helper.{native,byte}>: use_release-async
# Executable async_masterctl
<lib_test/async/masterctl.{native,byte}>: pkg_async
<lib_test/async/masterctl.{native,byte}>: pkg_async_extended
+<lib_test/async/masterctl.{native,byte}>: pkg_stdint
<lib_test/async/masterctl.{native,byte}>: pkg_str
<lib_test/async/masterctl.{native,byte}>: pkg_threads
-<lib_test/async/masterctl.{native,byte}>: pkg_uint.uint128
-<lib_test/async/masterctl.{native,byte}>: pkg_uint.uint32
-<lib_test/async/masterctl.{native,byte}>: pkg_uint.uint64
<lib_test/async/masterctl.{native,byte}>: pkg_unix
<lib_test/async/masterctl.{native,byte}>: use_release
<lib_test/async/masterctl.{native,byte}>: use_release-async
<lib_test/async/*.ml{,i,y}>: pkg_async
<lib_test/async/*.ml{,i,y}>: pkg_async_extended
+<lib_test/async/*.ml{,i,y}>: pkg_stdint
<lib_test/async/*.ml{,i,y}>: pkg_str
<lib_test/async/*.ml{,i,y}>: pkg_threads
-<lib_test/async/*.ml{,i,y}>: pkg_uint.uint128
-<lib_test/async/*.ml{,i,y}>: pkg_uint.uint32
-<lib_test/async/*.ml{,i,y}>: pkg_uint.uint64
<lib_test/async/*.ml{,i,y}>: pkg_unix
<lib_test/async/*.ml{,i,y}>: use_release
<lib_test/async/*.ml{,i,y}>: use_release-async
# Executable async_test_config
<lib_test/async/config/config_test.{native,byte}>: pkg_async
<lib_test/async/config/config_test.{native,byte}>: pkg_async_extended
+<lib_test/async/config/config_test.{native,byte}>: pkg_stdint
<lib_test/async/config/config_test.{native,byte}>: pkg_str
<lib_test/async/config/config_test.{native,byte}>: pkg_threads
-<lib_test/async/config/config_test.{native,byte}>: pkg_uint.uint128
-<lib_test/async/config/config_test.{native,byte}>: pkg_uint.uint32
-<lib_test/async/config/config_test.{native,byte}>: pkg_uint.uint64
<lib_test/async/config/config_test.{native,byte}>: pkg_unix
<lib_test/async/config/config_test.{native,byte}>: use_release
<lib_test/async/config/config_test.{native,byte}>: use_release-async
<lib_test/async/config/*.ml{,i,y}>: pkg_async
<lib_test/async/config/*.ml{,i,y}>: pkg_async_extended
+<lib_test/async/config/*.ml{,i,y}>: pkg_stdint
<lib_test/async/config/*.ml{,i,y}>: pkg_str
<lib_test/async/config/*.ml{,i,y}>: pkg_threads
-<lib_test/async/config/*.ml{,i,y}>: pkg_uint.uint128
-<lib_test/async/config/*.ml{,i,y}>: pkg_uint.uint32
-<lib_test/async/config/*.ml{,i,y}>: pkg_uint.uint64
<lib_test/async/config/*.ml{,i,y}>: pkg_unix
<lib_test/async/config/*.ml{,i,y}>: use_release
<lib_test/async/config/*.ml{,i,y}>: use_release-async
# Executable lwt_test_master
<lib_test/lwt/master.{native,byte}>: pkg_lwt
<lib_test/lwt/master.{native,byte}>: pkg_lwt.unix
+<lib_test/lwt/master.{native,byte}>: pkg_stdint
<lib_test/lwt/master.{native,byte}>: pkg_str
-<lib_test/lwt/master.{native,byte}>: pkg_uint.uint128
-<lib_test/lwt/master.{native,byte}>: pkg_uint.uint32
-<lib_test/lwt/master.{native,byte}>: pkg_uint.uint64
<lib_test/lwt/master.{native,byte}>: pkg_unix
<lib_test/lwt/master.{native,byte}>: use_release
<lib_test/lwt/master.{native,byte}>: use_release-lwt
# Executable lwt_test_slave
<lib_test/lwt/slave.{native,byte}>: pkg_lwt
<lib_test/lwt/slave.{native,byte}>: pkg_lwt.unix
+<lib_test/lwt/slave.{native,byte}>: pkg_stdint
<lib_test/lwt/slave.{native,byte}>: pkg_str
-<lib_test/lwt/slave.{native,byte}>: pkg_uint.uint128
-<lib_test/lwt/slave.{native,byte}>: pkg_uint.uint32
-<lib_test/lwt/slave.{native,byte}>: pkg_uint.uint64
<lib_test/lwt/slave.{native,byte}>: pkg_unix
<lib_test/lwt/slave.{native,byte}>: use_release
<lib_test/lwt/slave.{native,byte}>: use_release-lwt
# Executable lwt_test_helper
<lib_test/lwt/helper.{native,byte}>: pkg_lwt
<lib_test/lwt/helper.{native,byte}>: pkg_lwt.unix
+<lib_test/lwt/helper.{native,byte}>: pkg_stdint
<lib_test/lwt/helper.{native,byte}>: pkg_str
-<lib_test/lwt/helper.{native,byte}>: pkg_uint.uint128
-<lib_test/lwt/helper.{native,byte}>: pkg_uint.uint32
-<lib_test/lwt/helper.{native,byte}>: pkg_uint.uint64
<lib_test/lwt/helper.{native,byte}>: pkg_unix
<lib_test/lwt/helper.{native,byte}>: use_release
<lib_test/lwt/helper.{native,byte}>: use_release-lwt
-# Executable lwt_test_worker
-<lib_test/lwt/worker.{native,byte}>: pkg_lwt
-<lib_test/lwt/worker.{native,byte}>: pkg_lwt.unix
-<lib_test/lwt/worker.{native,byte}>: pkg_str
-<lib_test/lwt/worker.{native,byte}>: pkg_uint.uint128
-<lib_test/lwt/worker.{native,byte}>: pkg_uint.uint32
-<lib_test/lwt/worker.{native,byte}>: pkg_uint.uint64
-<lib_test/lwt/worker.{native,byte}>: pkg_unix
-<lib_test/lwt/worker.{native,byte}>: use_release
-<lib_test/lwt/worker.{native,byte}>: use_release-lwt
# Executable lwt_masterctl
<lib_test/lwt/masterctl.{native,byte}>: pkg_lwt
<lib_test/lwt/masterctl.{native,byte}>: pkg_lwt.unix
+<lib_test/lwt/masterctl.{native,byte}>: pkg_stdint
<lib_test/lwt/masterctl.{native,byte}>: pkg_str
-<lib_test/lwt/masterctl.{native,byte}>: pkg_uint.uint128
-<lib_test/lwt/masterctl.{native,byte}>: pkg_uint.uint32
-<lib_test/lwt/masterctl.{native,byte}>: pkg_uint.uint64
<lib_test/lwt/masterctl.{native,byte}>: pkg_unix
<lib_test/lwt/masterctl.{native,byte}>: use_release
<lib_test/lwt/masterctl.{native,byte}>: use_release-lwt
<lib_test/lwt/*.ml{,i,y}>: pkg_lwt
<lib_test/lwt/*.ml{,i,y}>: pkg_lwt.unix
+<lib_test/lwt/*.ml{,i,y}>: pkg_stdint
<lib_test/lwt/*.ml{,i,y}>: pkg_str
-<lib_test/lwt/*.ml{,i,y}>: pkg_uint.uint128
-<lib_test/lwt/*.ml{,i,y}>: pkg_uint.uint32
-<lib_test/lwt/*.ml{,i,y}>: pkg_uint.uint64
<lib_test/lwt/*.ml{,i,y}>: pkg_unix
<lib_test/lwt/*.ml{,i,y}>: use_release
<lib_test/lwt/*.ml{,i,y}>: use_release-lwt
# Executable lwt_test_config
<lib_test/lwt/config/config_test.{native,byte}>: pkg_lwt
<lib_test/lwt/config/config_test.{native,byte}>: pkg_lwt.unix
+<lib_test/lwt/config/config_test.{native,byte}>: pkg_stdint
<lib_test/lwt/config/config_test.{native,byte}>: pkg_str
-<lib_test/lwt/config/config_test.{native,byte}>: pkg_uint.uint128
-<lib_test/lwt/config/config_test.{native,byte}>: pkg_uint.uint32
-<lib_test/lwt/config/config_test.{native,byte}>: pkg_uint.uint64
<lib_test/lwt/config/config_test.{native,byte}>: pkg_unix
<lib_test/lwt/config/config_test.{native,byte}>: use_release
<lib_test/lwt/config/config_test.{native,byte}>: use_release-lwt
<lib_test/lwt/config/*.ml{,i,y}>: pkg_lwt
<lib_test/lwt/config/*.ml{,i,y}>: pkg_lwt.unix
+<lib_test/lwt/config/*.ml{,i,y}>: pkg_stdint
<lib_test/lwt/config/*.ml{,i,y}>: pkg_str
-<lib_test/lwt/config/*.ml{,i,y}>: pkg_uint.uint128
-<lib_test/lwt/config/*.ml{,i,y}>: pkg_uint.uint32
-<lib_test/lwt/config/*.ml{,i,y}>: pkg_uint.uint64
<lib_test/lwt/config/*.ml{,i,y}>: pkg_unix
<lib_test/lwt/config/*.ml{,i,y}>: use_release
<lib_test/lwt/config/*.ml{,i,y}>: use_release-lwt
View
11 lib/async/release_async.ml
@@ -1,4 +1,5 @@
module Std_unix = Unix
+module Std_bytes = Bytes
open Core.Std
open Async.Std
open Async_extended.Std
@@ -56,7 +57,8 @@ struct
module Logger = struct
type t = Log.t
- let syslog = Log.create `Info [Log.Syslog.output ()]
+ let syslog =
+ Log.create ~level:`Info ~output:[Log.Syslog.output ()] ~on_error:`Raise
let debug logger fmt =
ksprintf (fun s -> return (Log.debug logger "%s" s)) fmt
@@ -216,7 +218,8 @@ struct
let blit src src_pos dst dst_pos len =
Bigstring.blit ~src ~src_pos ~len ~dst ~dst_pos
- let blit_string_bytes src src_pos dst dst_pos len =
+ let blit_from_bytes src src_pos dst dst_pos len =
+ let src = Std_bytes.of_string src in
Bigstring.From_string.blit ~src ~src_pos ~len ~dst ~dst_pos
let create n = Bigstring.create n
let fill buf pos len c =
@@ -248,7 +251,9 @@ struct
let read fd buf pos len =
if Fd.supports_nonblock fd then
nonblocking fd `Read ~name:"nonblocking_read"
- (fun fd -> Bigstring.read_assume_fd_is_nonblocking fd buf ~pos ~len)
+ (fun fd ->
+ let r = Bigstring.read_assume_fd_is_nonblocking fd buf ~pos ~len in
+ Core.Std.Unix.Syscall_result.Int.ok_exn r)
else
Fd.syscall_in_thread_exn fd ~name:"read"
(fun fd -> Bigstring.read fd buf ~pos ~len)
View
2 lib/lwt/release_lwt.ml
@@ -120,7 +120,7 @@ struct
type t = Lwt_bytes.t
let blit = Lwt_bytes.blit
- let blit_string_bytes = Lwt_bytes.blit_string_bytes
+ let blit_from_bytes = Lwt_bytes.blit_from_bytes
let create = Lwt_bytes.create
let fill = Lwt_bytes.fill
let get = Lwt_bytes.get
View
4 lib/release/META
@@ -1,8 +1,8 @@
# OASIS_START
-# DO NOT EDIT (digest: 50b11a6c273a3a561d340fcd5f454bad)
+# DO NOT EDIT (digest: caa1273352e52fb73e5b7fee8c17619a)
version = "2.0.0"
description = "OCaml daemon framework"
-requires = "str unix uint.uint32 uint.uint64 uint.uint128"
+requires = "str unix stdint"
archive(byte) = "release.cma"
archive(byte, plugin) = "release.cma"
archive(native) = "release.cmxa"
View
1 lib/release/release.ml
@@ -1,4 +1,5 @@
open Printf
+open Stdint
open Release_util
module type S = sig
View
2 lib/release/release.mli
@@ -27,6 +27,8 @@
computations are represented by the ['a future] type.
*)
+open Stdint
+
module type S = sig
type +'a future
type fd
View
2 lib/release/release_buffer.ml
@@ -64,7 +64,7 @@ struct
let add_string buf s =
let len = String.length s in
- Future.Bytes.blit_string_bytes s 0 buf.bytes buf.len len;
+ Future.Bytes.blit_from_bytes s 0 buf.bytes buf.len len;
buf.len <- buf.len + len
let sub buf off len =
View
2 lib/release/release_bytes.ml
@@ -1,3 +1,5 @@
+open Stdint
+
module type S = sig
type buffer
View
2 lib/release/release_future.mli
@@ -80,7 +80,7 @@ module type S = sig
type t
val blit : t -> int -> t -> int -> int -> unit
- val blit_string_bytes : string -> int -> t -> int -> int -> unit
+ val blit_from_bytes : bytes -> int -> t -> int -> int -> unit
val create : int -> t
val fill : t -> int -> int -> char -> unit
val get : t -> int -> char
View
3 lib_test/async/logger.ml
@@ -1,3 +1,4 @@
open Async_extended.Std
-let syslog = Log.create `Debug [Log.Output.stdout ()]
+let syslog =
+ Log.create ~level:`Debug ~output:[Log.Output.stdout ()] ~on_error:`Raise
View
174 myocamlbuild.ml
@@ -1,5 +1,5 @@
(* OASIS_START *)
-(* DO NOT EDIT (digest: 86e024a67a1fb2bc4a26b080ccc6740e) *)
+(* DO NOT EDIT (digest: f236ad40a8c330a98a5646c29b9d94c3) *)
module OASISGettext = struct
(* # 22 "src/oasis/OASISGettext.ml" *)
@@ -29,6 +29,166 @@ module OASISGettext = struct
end
+module OASISString = struct
+(* # 22 "src/oasis/OASISString.ml" *)
+
+
+ (** Various string utilities.
+
+ Mostly inspired by extlib and batteries ExtString and BatString libraries.
+
+ @author Sylvain Le Gall
+ *)
+
+
+ let nsplitf str f =
+ if str = "" then
+ []
+ else
+ let buf = Buffer.create 13 in
+ let lst = ref [] in
+ let push () =
+ lst := Buffer.contents buf :: !lst;
+ Buffer.clear buf
+ in
+ let str_len = String.length str in
+ for i = 0 to str_len - 1 do
+ if f str.[i] then
+ push ()
+ else
+ Buffer.add_char buf str.[i]
+ done;
+ push ();
+ List.rev !lst
+
+
+ (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the
+ separator.
+ *)
+ let nsplit str c =
+ nsplitf str ((=) c)
+
+
+ let find ~what ?(offset=0) str =
+ let what_idx = ref 0 in
+ let str_idx = ref offset in
+ while !str_idx < String.length str &&
+ !what_idx < String.length what do
+ if str.[!str_idx] = what.[!what_idx] then
+ incr what_idx
+ else
+ what_idx := 0;
+ incr str_idx
+ done;
+ if !what_idx <> String.length what then
+ raise Not_found
+ else
+ !str_idx - !what_idx
+
+
+ let sub_start str len =
+ let str_len = String.length str in
+ if len >= str_len then
+ ""
+ else
+ String.sub str len (str_len - len)
+
+
+ let sub_end ?(offset=0) str len =
+ let str_len = String.length str in
+ if len >= str_len then
+ ""
+ else
+ String.sub str 0 (str_len - len)
+
+
+ let starts_with ~what ?(offset=0) str =
+ let what_idx = ref 0 in
+ let str_idx = ref offset in
+ let ok = ref true in
+ while !ok &&
+ !str_idx < String.length str &&
+ !what_idx < String.length what do
+ if str.[!str_idx] = what.[!what_idx] then
+ incr what_idx
+ else
+ ok := false;
+ incr str_idx
+ done;
+ if !what_idx = String.length what then
+ true
+ else
+ false
+
+
+ let strip_starts_with ~what str =
+ if starts_with ~what str then
+ sub_start str (String.length what)
+ else
+ raise Not_found
+
+
+ let ends_with ~what ?(offset=0) str =
+ let what_idx = ref ((String.length what) - 1) in
+ let str_idx = ref ((String.length str) - 1) in
+ let ok = ref true in
+ while !ok &&
+ offset <= !str_idx &&
+ 0 <= !what_idx do
+ if str.[!str_idx] = what.[!what_idx] then
+ decr what_idx
+ else
+ ok := false;
+ decr str_idx
+ done;
+ if !what_idx = -1 then
+ true
+ else
+ false
+
+
+ let strip_ends_with ~what str =
+ if ends_with ~what str then
+ sub_end str (String.length what)
+ else
+ raise Not_found
+
+
+ let replace_chars f s =
+ let buf = Buffer.create (String.length s) in
+ String.iter (fun c -> Buffer.add_char buf (f c)) s;
+ Buffer.contents buf
+
+ let lowercase_ascii =
+ replace_chars
+ (fun c ->
+ if (c >= 'A' && c <= 'Z') then
+ Char.chr (Char.code c + 32)
+ else
+ c)
+
+ let uncapitalize_ascii s =
+ if s <> "" then
+ (lowercase_ascii (String.sub s 0 1)) ^ (String.sub s 1 ((String.length s) - 1))
+ else
+ s
+
+ let uppercase_ascii =
+ replace_chars
+ (fun c ->
+ if (c >= 'a' && c <= 'z') then
+ Char.chr (Char.code c - 32)
+ else
+ c)
+
+ let capitalize_ascii s =
+ if s <> "" then
+ (uppercase_ascii (String.sub s 0 1)) ^ (String.sub s 1 ((String.length s) - 1))
+ else
+ s
+
+end
+
module OASISExpr = struct
(* # 22 "src/oasis/OASISExpr.ml" *)
@@ -129,7 +289,7 @@ module OASISExpr = struct
end
-# 132 "myocamlbuild.ml"
+# 292 "myocamlbuild.ml"
module BaseEnvLight = struct
(* # 22 "src/base/BaseEnvLight.ml" *)
@@ -234,7 +394,7 @@ module BaseEnvLight = struct
end
-# 237 "myocamlbuild.ml"
+# 397 "myocamlbuild.ml"
module MyOCamlbuildFindlib = struct
(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
@@ -516,7 +676,7 @@ module MyOCamlbuildBase = struct
| nm, [], intf_modules ->
ocaml_lib nm;
let cmis =
- List.map (fun m -> (String.uncapitalize m) ^ ".cmi")
+ List.map (fun m -> (OASISString.uncapitalize_ascii m) ^ ".cmi")
intf_modules in
dep ["ocaml"; "link"; "library"; "file:"^nm^".cma"] cmis
| nm, dir :: tl, intf_modules ->
@@ -529,7 +689,7 @@ module MyOCamlbuildBase = struct
["compile"; "infer_interface"; "doc"])
tl;
let cmis =
- List.map (fun m -> dir^"/"^(String.uncapitalize m)^".cmi")
+ List.map (fun m -> dir^"/"^(OASISString.uncapitalize_ascii m)^".cmi")
intf_modules in
dep ["ocaml"; "link"; "library"; "file:"^dir^"/"^nm^".cma"]
cmis)
@@ -603,7 +763,7 @@ module MyOCamlbuildBase = struct
end
-# 606 "myocamlbuild.ml"
+# 766 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
@@ -631,7 +791,7 @@ let conf = {MyOCamlbuildFindlib.no_automatic_syntax = false}
let dispatch_default = MyOCamlbuildBase.dispatch_default conf package_default;;
-# 635 "myocamlbuild.ml"
+# 795 "myocamlbuild.ml"
(* OASIS_STOP *)
(*flag ["ocaml"; "compile"; "ppopt_lwt_debug"] & S[A"-ppopt"; A"-lwt-debug"];*)
flag ["ocaml"; "compile"; "warn_error"] & S[A"-warn-error"; A"A"];
View
113 setup.ml
@@ -1,9 +1,9 @@
(* setup.ml generated for the first time by OASIS v0.2.0 *)
(* OASIS_START *)
-(* DO NOT EDIT (digest: 9dbfd2192a0732e46b37917429de69c2) *)
+(* DO NOT EDIT (digest: b073279b8dd7330bb5165963b1a732e2) *)
(*
- Regenerated by OASIS v0.4.5
+ Regenerated by OASIS v0.4.6
Visit http://oasis.forge.ocamlcore.org for more information and
documentation about functions used in this file.
*)
@@ -246,6 +246,33 @@ module OASISString = struct
String.iter (fun c -> Buffer.add_char buf (f c)) s;
Buffer.contents buf
+ let lowercase_ascii =
+ replace_chars
+ (fun c ->
+ if (c >= 'A' && c <= 'Z') then
+ Char.chr (Char.code c + 32)
+ else
+ c)
+
+ let uncapitalize_ascii s =
+ if s <> "" then
+ (lowercase_ascii (String.sub s 0 1)) ^ (String.sub s 1 ((String.length s) - 1))
+ else
+ s
+
+ let uppercase_ascii =
+ replace_chars
+ (fun c ->
+ if (c >= 'a' && c <= 'z') then
+ Char.chr (Char.code c - 32)
+ else
+ c)
+
+ let capitalize_ascii s =
+ if s <> "" then
+ (uppercase_ascii (String.sub s 0 1)) ^ (String.sub s 1 ((String.length s) - 1))
+ else
+ s
end
@@ -315,19 +342,15 @@ module OASISUtils = struct
let compare_csl s1 s2 =
- String.compare (String.lowercase s1) (String.lowercase s2)
+ String.compare (OASISString.lowercase_ascii s1) (OASISString.lowercase_ascii s2)
module HashStringCsl =
Hashtbl.Make
(struct
type t = string
-
- let equal s1 s2 =
- (String.lowercase s1) = (String.lowercase s2)
-
- let hash s =
- Hashtbl.hash (String.lowercase s)
+ let equal s1 s2 = (compare_csl s1 s2) = 0
+ let hash s = Hashtbl.hash (OASISString.lowercase_ascii s)
end)
module SetStringCsl =
@@ -365,7 +388,7 @@ module OASISUtils = struct
else
buf
in
- String.lowercase buf
+ OASISString.lowercase_ascii buf
end
@@ -471,7 +494,7 @@ module PropList = struct
order = Queue.create ();
name_norm =
(if case_insensitive then
- String.lowercase
+ OASISString.lowercase_ascii
else
fun s -> s);
}
@@ -1822,13 +1845,13 @@ module OASISUnixPath = struct
let capitalize_file f =
let dir = dirname f in
let base = basename f in
- concat dir (String.capitalize base)
+ concat dir (OASISString.capitalize_ascii base)
let uncapitalize_file f =
let dir = dirname f in
let base = basename f in
- concat dir (String.uncapitalize base)
+ concat dir (OASISString.uncapitalize_ascii base)
end
@@ -2890,7 +2913,7 @@ module OASISFileUtil = struct
end
-# 2893 "setup.ml"
+# 2916 "setup.ml"
module BaseEnvLight = struct
(* # 22 "src/base/BaseEnvLight.ml" *)
@@ -2995,7 +3018,7 @@ module BaseEnvLight = struct
end
-# 2998 "setup.ml"
+# 3021 "setup.ml"
module BaseContext = struct
(* # 22 "src/base/BaseContext.ml" *)
@@ -5406,7 +5429,7 @@ module BaseSetup = struct
end
-# 5409 "setup.ml"
+# 5432 "setup.ml"
module InternalConfigurePlugin = struct
(* # 22 "src/plugins/internal/InternalConfigurePlugin.ml" *)
@@ -5845,8 +5868,8 @@ module InternalInstallPlugin = struct
let make_fnames modul sufx =
List.fold_right
begin fun sufx accu ->
- (String.capitalize modul ^ sufx) ::
- (String.uncapitalize modul ^ sufx) ::
+ (OASISString.capitalize_ascii modul ^ sufx) ::
+ (OASISString.uncapitalize_ascii modul ^ sufx) ::
accu
end
sufx
@@ -6270,7 +6293,7 @@ module InternalInstallPlugin = struct
end
-# 6273 "setup.ml"
+# 6296 "setup.ml"
module OCamlbuildCommon = struct
(* # 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml" *)
@@ -6648,7 +6671,7 @@ module OCamlbuildDocPlugin = struct
end
-# 6651 "setup.ml"
+# 6674 "setup.ml"
open OASISTypes;;
let setup_t =
@@ -6751,15 +6774,7 @@ let setup_t =
[
FindlibPackage ("str", None);
FindlibPackage ("unix", None);
- FindlibPackage
- ("uint.uint32",
- Some (OASISVersion.VGreaterEqual "1.0.1"));
- FindlibPackage
- ("uint.uint64",
- Some (OASISVersion.VGreaterEqual "1.0.1"));
- FindlibPackage
- ("uint.uint128",
- Some (OASISVersion.VGreaterEqual "1.0.1"))
+ FindlibPackage ("stdint", None)
];
bs_build_tools = [ExternalTool "ocamlbuild"];
bs_c_sources = [];
@@ -6880,9 +6895,11 @@ let setup_t =
bs_build_depends =
[
FindlibPackage
- ("lwt", Some (OASISVersion.VEqual "2.4.6"));
+ ("lwt",
+ Some (OASISVersion.VGreaterEqual "2.5.0"));
FindlibPackage
- ("lwt.unix", Some (OASISVersion.VEqual "2.4.6"));
+ ("lwt.unix",
+ Some (OASISVersion.VGreaterEqual "2.5.0"));
InternalLibrary "release"
];
bs_build_tools = [ExternalTool "ocamlbuild"];
@@ -7150,33 +7167,6 @@ let setup_t =
{exec_custom = false; exec_main_is = "helper.ml"});
Executable
({
- cs_name = "lwt_test_worker";
- cs_data = PropList.Data.create ();
- cs_plugin_data = []
- },
- {
- bs_build = [(OASISExpr.EBool true, true)];
- bs_install = [(OASISExpr.EBool true, false)];
- bs_path = "lib_test/lwt";
- bs_compiled_object = Best;
- bs_build_depends =
- [
- InternalLibrary "release-lwt";
- FindlibPackage ("str", None)
- ];
- bs_build_tools = [ExternalTool "ocamlbuild"];
- bs_c_sources = [];
- bs_data_files = [];
- bs_ccopt = [(OASISExpr.EBool true, [])];
- bs_cclib = [(OASISExpr.EBool true, [])];
- bs_dlllib = [(OASISExpr.EBool true, [])];
- bs_dllpath = [(OASISExpr.EBool true, [])];
- bs_byteopt = [(OASISExpr.EBool true, [])];
- bs_nativeopt = [(OASISExpr.EBool true, [])]
- },
- {exec_custom = false; exec_main_is = "worker.ml"});
- Executable
- ({
cs_name = "lwt_masterctl";
cs_data = PropList.Data.create ();
cs_plugin_data = []
@@ -7238,16 +7228,15 @@ let setup_t =
plugin_data = []
};
oasis_fn = Some "_oasis";
- oasis_version = "0.4.5";
- oasis_digest =
- Some "?y\146\194\242\031F\189\181\030\131<\027\136\218\251";
+ oasis_version = "0.4.6";
+ oasis_digest = Some "lp:\203^i\t\134\198\174\137u\165\012)\207";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
};;
let setup () = BaseSetup.setup setup_t;;
-# 7252 "setup.ml"
+# 7241 "setup.ml"
(* OASIS_STOP *)
let () = setup ();;

0 comments on commit 0271222

Please sign in to comment.