File: stdcompat__sys.ml.in

package info (click to toggle)
ocaml-stdcompat 14-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,152 kB
  • sloc: ml: 22,329; makefile: 211; sh: 120
file content (106 lines) | stat: -rw-r--r-- 1,839 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
include Sys

@BEGIN_BEFORE_4_10_0@
module Immediate64 = struct
  module type Non_immediate = sig
    type t
  end
  module type Immediate = sig
    type t
@BEGIN_FROM_4_02_0@
[@@immediate]
@END_FROM_4_02_0@
  end

  module Make (Immediate : Immediate) (Non_immediate : Non_immediate) = struct
    type t = Non_immediate.t

    type 'a repr =
@BEGIN_FROM_4_00_0@
          | Immediate: Immediate.t repr
          | Non_immediate: Non_immediate.t repr
@END_FROM_4_00_0@
@BEGIN_BEFORE_4_00_0@
          | Immediate
          | Non_immediate
@END_BEFORE_4_00_0@

    let repr = Non_immediate
  end
end
@END_BEFORE_4_10_0@

@BEGIN_BEFORE_4_08_0@
let max_floatarray_length = max_array_length / (64 / word_size)
@END_BEFORE_4_08_0@

@BEGIN_BEFORE_4_05_0@
let getenv_opt var =
  Stdcompat__tools.option_find getenv var
@END_BEFORE_4_05_0@

@BEGIN_BEFORE_4_04_0@
type backend_type =
  | Native
  | Bytecode
  | Other of string

let backend_type =
  if Stdcompat__native.native then
    Native
  else
    Bytecode
@END_BEFORE_4_04_0@

@BEGIN_BEFORE_4_03_0@
let sigbus = -22

let sigpoll = -23

let sigsys = -24

let sigtrap = -25

let sigurg = -26

let sigxcpu = -27

let sigxfsz = -28

let int_size =
   if 1 lsl word_size = 0 then
     word_size
   else if 1 lsl (word_size - 1) = 0 then
     word_size - 1
   else
     assert false

let big_endian = @BIG_ENDIAN@

let runtime_variant () = ""

let runtime_parameters () = ""

let enable_runtime_warnings _ = ()

let runtime_warnings_enabled () = false

let opaque_identity x = x
@END_BEFORE_4_03_0@

@BEGIN_BEFORE_4_01_0@
let unix = os_type = "Unix"

let win32 = os_type = "Win32"

let cygwin = os_type = "Cygwin"
@END_BEFORE_4_01_0@

@BEGIN_BEFORE_3_10_0@
let is_directory path =
  try
    ignore (readdir path);
    true
  with Sys_error _ when file_exists path ->
    false
@END_BEFORE_3_10_0@