blob: aa07bfa4b9ced2ecac2e830536c08f3cb2fea94a [file] [log] [blame]
Richard Smith31cfef02014-05-21 00:33:49 +00001module std [system] {
2 // FIXME: The standard does not require that each of these submodules
3 // re-exports its imported modules. We should provide an alternative form of
4 // export that issues a warning if a name from the submodule is used, and
5 // use that to provide a 'strict mode' for libc++.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +00006
7 // Deprecated C-compatibility headers. These can all be included from within
8 // an 'extern "C"' context.
9 module depr [extern_c] {
10 // <assert.h> provided by C library.
11 module ctype_h {
12 header "ctype.h"
13 export *
14 }
15 module errno_h {
16 header "errno.h"
17 export *
18 }
19 // <fenv.h> provided by C library.
20 // <float.h> provided by compiler or C library.
21 module inttypes_h {
22 header "inttypes.h"
23 export stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000024 export *
25 }
26 // <iso646.h> provided by compiler.
27 // <limits.h> provided by compiler or C library.
Eric Fiselierc6213332016-11-19 01:14:15 +000028 module locale_h {
29 header "locale.h"
Eric Fiselierc6213332016-11-19 01:14:15 +000030 export *
31 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000032 module math_h {
33 header "math.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000034 export *
35 }
36 module setjmp_h {
37 header "setjmp.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000038 export *
39 }
40 // FIXME: <stdalign.h> is missing.
41 // <signal.h> provided by C library.
42 // <stdarg.h> provided by compiler.
43 // <stdbool.h> provided by compiler.
44 module stddef_h {
45 // <stddef.h>'s __need_* macros require textual inclusion.
46 textual header "stddef.h"
47 }
Eric Fiselier4d1198c2016-11-19 03:29:03 +000048 module stdint_h {
49 header "stdint.h"
50 export *
51 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000052 module stdio_h {
53 // <stdio.h>'s __need_* macros require textual inclusion.
54 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000055 export *
56 }
57 module stdlib_h {
58 // <stdlib.h>'s __need_* macros require textual inclusion.
59 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000060 export *
61 }
62 module string_h {
63 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000064 export *
65 }
66 // FIXME: <uchar.h> is missing.
67 // <time.h> provided by C library.
68 module wchar_h {
69 // <wchar.h>'s __need_* macros require textual inclusion.
70 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000071 export *
72 }
73 module wctype_h {
74 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000075 export *
76 }
77 }
78
79 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
80 // allow their use in extern "C" contexts.
81 module complex_h {
82 header "complex.h"
83 export ccomplex
84 export *
85 }
86 module tgmath_h {
87 header "tgmath.h"
88 export ccomplex
89 export cmath
90 export *
91 }
92
93 // C compatibility headers.
94 module compat {
95 module cassert {
96 // <cassert>'s use of NDEBUG requires textual inclusion.
97 textual header "cassert"
98 }
99 module ccomplex {
100 header "ccomplex"
101 export complex
102 export *
103 }
104 module cctype {
105 header "cctype"
106 export *
107 }
108 module cerrno {
109 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000110 export *
111 }
112 module cfenv {
113 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000114 export *
115 }
116 module cfloat {
117 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000118 export *
119 }
120 module cinttypes {
121 header "cinttypes"
122 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000123 export *
124 }
125 module ciso646 {
126 header "ciso646"
127 export *
128 }
129 module climits {
130 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000131 export *
132 }
133 module clocale {
134 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000135 export *
136 }
137 module cmath {
138 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000139 export *
140 }
141 module csetjmp {
142 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000143 export *
144 }
145 module csignal {
146 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000147 export *
148 }
149 // FIXME: <cstdalign> is missing.
150 module cstdarg {
151 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000152 export *
153 }
154 module cstdbool {
155 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000156 export *
157 }
158 module cstddef {
159 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000160 export *
161 }
162 module cstdint {
163 header "cstdint"
Eric Fiselier4d1198c2016-11-19 03:29:03 +0000164 export depr.stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000165 export *
166 }
167 module cstdio {
168 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000169 export *
170 }
171 module cstdlib {
172 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000173 export *
174 }
175 module cstring {
176 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000177 export *
178 }
179 module ctgmath {
180 header "ctgmath"
181 export ccomplex
182 export cmath
183 export *
184 }
185 module ctime {
186 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000187 export *
188 }
189 // FIXME: <cuchar> is missing.
190 module cwchar {
191 header "cwchar"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000192 export *
193 }
194 module cwctype {
195 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000196 export *
197 }
198 }
199
Richard Smith31cfef02014-05-21 00:33:49 +0000200 module algorithm {
201 header "algorithm"
202 export initializer_list
203 export *
204 }
205 module array {
206 header "array"
207 export initializer_list
208 export *
209 }
210 module atomic {
211 header "atomic"
212 export *
Nico Webera6789802014-09-24 04:44:54 +0000213 requires cplusplus11
Richard Smith31cfef02014-05-21 00:33:49 +0000214 }
215 module bitset {
216 header "bitset"
217 export string
218 export iosfwd
219 export *
220 }
221 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000222 module chrono {
223 header "chrono"
224 export *
225 }
Richard Smith31cfef02014-05-21 00:33:49 +0000226 module codecvt {
227 header "codecvt"
228 export *
229 }
230 module complex {
231 header "complex"
232 export *
233 }
234 module condition_variable {
235 header "condition_variable"
236 export *
237 }
Richard Smith31cfef02014-05-21 00:33:49 +0000238 module deque {
239 header "deque"
240 export initializer_list
241 export *
242 }
243 module exception {
244 header "exception"
245 export *
246 }
247 module forward_list {
248 header "forward_list"
249 export initializer_list
250 export *
251 }
252 module fstream {
253 header "fstream"
254 export *
255 }
256 module functional {
257 header "functional"
258 export *
259 }
260 module future {
261 header "future"
262 export *
263 }
264 module initializer_list {
265 header "initializer_list"
266 export *
267 }
268 module iomanip {
269 header "iomanip"
270 export *
271 }
272 module ios {
273 header "ios"
274 export iosfwd
275 export *
276 }
277 module iosfwd {
278 header "iosfwd"
279 export *
280 }
281 module iostream {
282 header "iostream"
283 export ios
284 export streambuf
285 export istream
286 export ostream
287 export *
288 }
289 module istream {
290 header "istream"
291 // FIXME: should re-export ios, streambuf?
292 export *
293 }
294 module iterator {
295 header "iterator"
296 export *
297 }
298 module limits {
299 header "limits"
300 export *
301 }
302 module list {
303 header "list"
304 export initializer_list
305 export *
306 }
307 module locale {
308 header "locale"
309 export *
310 }
311 module map {
312 header "map"
313 export initializer_list
314 export *
315 }
316 module memory {
317 header "memory"
318 export *
319 }
320 module mutex {
321 header "mutex"
322 export *
323 }
324 module new {
325 header "new"
326 export *
327 }
328 module numeric {
329 header "numeric"
330 export *
331 }
332 module ostream {
333 header "ostream"
334 // FIXME: should re-export ios, streambuf?
335 export *
336 }
337 module queue {
338 header "queue"
339 export initializer_list
340 export *
341 }
342 module random {
343 header "random"
344 export initializer_list
345 export *
346 }
347 module ratio {
348 header "ratio"
349 export *
350 }
351 module regex {
352 header "regex"
353 export initializer_list
354 export *
355 }
356 module scoped_allocator {
357 header "scoped_allocator"
358 export *
359 }
360 module set {
361 header "set"
362 export initializer_list
363 export *
364 }
365 module sstream {
366 header "sstream"
367 // FIXME: should re-export istream, ostream, ios, streambuf, string?
368 export *
369 }
370 module stack {
371 header "stack"
372 export initializer_list
373 export *
374 }
375 module stdexcept {
376 header "stdexcept"
377 export *
378 }
379 module streambuf {
380 header "streambuf"
381 export *
382 }
383 module string {
384 header "string"
385 export initializer_list
386 export *
387 }
388 module strstream {
389 header "strstream"
390 requires !cplusplus11
391 }
392 module system_error {
393 header "system_error"
394 export *
395 }
396 module thread {
397 header "thread"
398 export *
399 }
400 module tuple {
401 header "tuple"
402 export *
403 }
404 module type_traits {
405 header "type_traits"
406 export *
407 }
408 module typeindex {
409 header "typeindex"
410 export *
411 }
412 module typeinfo {
413 header "typeinfo"
414 export *
415 }
416 module unordered_map {
417 header "unordered_map"
418 export initializer_list
419 export *
420 }
421 module unordered_set {
422 header "unordered_set"
423 export initializer_list
424 export *
425 }
426 module utility {
427 header "utility"
428 export initializer_list
429 export *
430 }
431 module valarray {
432 header "valarray"
433 export initializer_list
434 export *
435 }
436 module vector {
437 header "vector"
438 export initializer_list
439 export *
440 }
441
Richard Smith2d1b6372015-10-13 22:13:33 +0000442 // FIXME: We don't have modules for the <foo.h> headers, because they might
443 // be included from the C library's headers, and that would create a #include
444 // cycle. For the same reason, we don't have a module for __config.
445 //module __config { header "__config" export * }
446
Richard Smith31cfef02014-05-21 00:33:49 +0000447 // FIXME: These should be private.
448 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000449 module __debug { header "__debug" export * }
450 module __functional_base { header "__functional_base" export * }
451 module __hash_table { header "__hash_table" export * }
452 module __locale { header "__locale" export * }
453 module __mutex_base { header "__mutex_base" export * }
454 module __split_buffer { header "__split_buffer" export * }
455 module __sso_allocator { header "__sso_allocator" export * }
456 module __std_stream { header "__std_stream" export * }
457 module __tree { header "__tree" export * }
458 module __tuple { header "__tuple" export * }
459 module __undef_min_max { header "__undef_min_max" export * }
Saleem Abdulrasooldcf27a62015-02-13 22:15:32 +0000460 module __undef___deallocate { header "__undef___deallocate" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000461}