Import Upstream version 20180207
[hcoop/debian/mlton.git] / basis-library / config / c / sys-types.sml
1 (* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8 signature C_SYSTYPE =
9 sig
10 type t
11 val castFromSysWord: SysWord.word -> t
12 val castToSysWord: t -> SysWord.t
13 end
14 signature C_FLAGTYPE =
15 sig
16 include C_SYSTYPE
17 val andb: t * t -> t
18 val notb: t -> t
19 val orb: t * t -> t
20 end
21
22 (* from <dirent.h> *)
23 structure C_DirP : C_SYSTYPE = C_DirP
24
25 (* from <poll.h> *)
26 structure C_NFds : sig
27 include C_SYSTYPE
28 val fromInt: Int.int -> t
29 end = C_NFds
30
31 (* from <resource.h> *)
32 structure C_RLim : C_SYSTYPE = C_RLim
33
34 (* from <sys/types.h> *)
35 structure C_Clock : sig
36 include C_SYSTYPE
37 val castFromFixedInt: FixedInt.int -> t
38 val toLargeInt: t -> LargeInt.int
39 end = C_Clock
40 structure C_Dev : C_SYSTYPE = C_Dev
41 structure C_GId : C_SYSTYPE = C_GId
42 structure C_INo : C_SYSTYPE = C_INo
43 structure C_Mode : C_FLAGTYPE = C_Mode
44 structure C_NLink : sig
45 include C_SYSTYPE
46 val toInt: t -> int
47 end = C_NLink
48 structure C_Off = C_Off
49 structure C_PId : sig
50 include C_SYSTYPE
51 val castFromFixedInt: FixedInt.int -> t
52 val ~ : t -> t
53 end = C_PId
54 structure C_SSize : sig
55 include C_SYSTYPE
56 val castFromFixedInt: FixedInt.int -> t
57 val toInt: t -> Int.int
58 end = C_SSize
59 structure C_SUSeconds : sig
60 include C_SYSTYPE
61 val castFromFixedInt: FixedInt.int -> t
62 val fromLargeInt: LargeInt.int -> t
63 val toLargeInt: t -> LargeInt.int
64 end = C_SUSeconds
65 structure C_Time : sig
66 include C_SYSTYPE
67 val castFromFixedInt: FixedInt.int -> t
68 val fromInt: Int.int -> t
69 val fromLargeInt: LargeInt.int -> t
70 val toInt: t -> Int.int
71 val toLargeInt: t -> LargeInt.int
72 end = C_Time
73 structure C_UId : C_SYSTYPE = C_UId
74
75 (* from <sys/socket.h> *)
76 structure C_Socklen = C_Socklen
77
78 (* from <termios.h> *)
79 structure C_CC : C_SYSTYPE = C_CC
80 structure C_Speed : sig
81 include C_SYSTYPE
82 val compare: t * t -> order
83 end = C_Speed
84 structure C_TCFlag : C_FLAGTYPE = C_TCFlag