blob: ce126609dc0da703a51d3b013dbe9efd4bfdb9bd [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 Fiseliercbda4fb2016-11-22 20:05:19 +000048 module stdint_h {
49 header "stdint.h"
50 export *
51 // FIXME: This module only exists on OS X and for some reason the
52 // wildcard above doesn't export it.
53 export Darwin.C.stdint
54 }
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000055 module stdio_h {
56 // <stdio.h>'s __need_* macros require textual inclusion.
57 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000058 export *
59 }
60 module stdlib_h {
61 // <stdlib.h>'s __need_* macros require textual inclusion.
62 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000063 export *
64 }
65 module string_h {
66 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000067 export *
68 }
69 // FIXME: <uchar.h> is missing.
70 // <time.h> provided by C library.
71 module wchar_h {
72 // <wchar.h>'s __need_* macros require textual inclusion.
73 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000074 export *
75 }
76 module wctype_h {
77 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000078 export *
79 }
80 }
81
82 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
83 // allow their use in extern "C" contexts.
84 module complex_h {
85 header "complex.h"
86 export ccomplex
87 export *
88 }
89 module tgmath_h {
90 header "tgmath.h"
91 export ccomplex
92 export cmath
93 export *
94 }
95
96 // C compatibility headers.
97 module compat {
98 module cassert {
99 // <cassert>'s use of NDEBUG requires textual inclusion.
100 textual header "cassert"
101 }
102 module ccomplex {
103 header "ccomplex"
104 export complex
105 export *
106 }
107 module cctype {
108 header "cctype"
109 export *
110 }
111 module cerrno {
112 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000113 export *
114 }
115 module cfenv {
116 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000117 export *
118 }
119 module cfloat {
120 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000121 export *
122 }
123 module cinttypes {
124 header "cinttypes"
125 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000126 export *
127 }
128 module ciso646 {
129 header "ciso646"
130 export *
131 }
132 module climits {
133 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000134 export *
135 }
136 module clocale {
137 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000138 export *
139 }
140 module cmath {
141 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000142 export *
143 }
144 module csetjmp {
145 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000146 export *
147 }
148 module csignal {
149 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000150 export *
151 }
152 // FIXME: <cstdalign> is missing.
153 module cstdarg {
154 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000155 export *
156 }
157 module cstdbool {
158 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000159 export *
160 }
161 module cstddef {
162 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000163 export *
164 }
165 module cstdint {
166 header "cstdint"
Eric Fiseliercbda4fb2016-11-22 20:05:19 +0000167 export depr.stdint_h
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000168 export *
169 }
170 module cstdio {
171 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000172 export *
173 }
174 module cstdlib {
175 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000176 export *
177 }
178 module cstring {
179 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000180 export *
181 }
182 module ctgmath {
183 header "ctgmath"
184 export ccomplex
185 export cmath
186 export *
187 }
188 module ctime {
189 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000190 export *
191 }
192 // FIXME: <cuchar> is missing.
193 module cwchar {
194 header "cwchar"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000195 export *
196 }
197 module cwctype {
198 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000199 export *
200 }
201 }
202
Richard Smith31cfef02014-05-21 00:33:49 +0000203 module algorithm {
204 header "algorithm"
205 export initializer_list
206 export *
207 }
208 module array {
209 header "array"
210 export initializer_list
211 export *
212 }
213 module atomic {
214 header "atomic"
215 export *
Nico Webera6789802014-09-24 04:44:54 +0000216 requires cplusplus11
Richard Smith31cfef02014-05-21 00:33:49 +0000217 }
218 module bitset {
219 header "bitset"
220 export string
221 export iosfwd
222 export *
223 }
224 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000225 module chrono {
226 header "chrono"
227 export *
228 }
Richard Smith31cfef02014-05-21 00:33:49 +0000229 module codecvt {
230 header "codecvt"
231 export *
232 }
233 module complex {
234 header "complex"
235 export *
236 }
237 module condition_variable {
238 header "condition_variable"
239 export *
240 }
Richard Smith31cfef02014-05-21 00:33:49 +0000241 module deque {
242 header "deque"
243 export initializer_list
244 export *
245 }
246 module exception {
247 header "exception"
248 export *
249 }
250 module forward_list {
251 header "forward_list"
252 export initializer_list
253 export *
254 }
255 module fstream {
256 header "fstream"
257 export *
258 }
259 module functional {
260 header "functional"
261 export *
262 }
263 module future {
264 header "future"
265 export *
266 }
267 module initializer_list {
268 header "initializer_list"
269 export *
270 }
271 module iomanip {
272 header "iomanip"
273 export *
274 }
275 module ios {
276 header "ios"
277 export iosfwd
278 export *
279 }
280 module iosfwd {
281 header "iosfwd"
282 export *
283 }
284 module iostream {
285 header "iostream"
286 export ios
287 export streambuf
288 export istream
289 export ostream
290 export *
291 }
292 module istream {
293 header "istream"
294 // FIXME: should re-export ios, streambuf?
295 export *
296 }
297 module iterator {
298 header "iterator"
299 export *
300 }
301 module limits {
302 header "limits"
303 export *
304 }
305 module list {
306 header "list"
307 export initializer_list
308 export *
309 }
310 module locale {
311 header "locale"
312 export *
313 }
314 module map {
315 header "map"
316 export initializer_list
317 export *
318 }
319 module memory {
320 header "memory"
321 export *
322 }
323 module mutex {
324 header "mutex"
325 export *
326 }
327 module new {
328 header "new"
329 export *
330 }
331 module numeric {
332 header "numeric"
333 export *
334 }
335 module ostream {
336 header "ostream"
337 // FIXME: should re-export ios, streambuf?
338 export *
339 }
340 module queue {
341 header "queue"
342 export initializer_list
343 export *
344 }
345 module random {
346 header "random"
347 export initializer_list
348 export *
349 }
350 module ratio {
351 header "ratio"
352 export *
353 }
354 module regex {
355 header "regex"
356 export initializer_list
357 export *
358 }
359 module scoped_allocator {
360 header "scoped_allocator"
361 export *
362 }
363 module set {
364 header "set"
365 export initializer_list
366 export *
367 }
368 module sstream {
369 header "sstream"
370 // FIXME: should re-export istream, ostream, ios, streambuf, string?
371 export *
372 }
373 module stack {
374 header "stack"
375 export initializer_list
376 export *
377 }
378 module stdexcept {
379 header "stdexcept"
380 export *
381 }
382 module streambuf {
383 header "streambuf"
384 export *
385 }
386 module string {
387 header "string"
388 export initializer_list
389 export *
390 }
391 module strstream {
392 header "strstream"
393 requires !cplusplus11
394 }
395 module system_error {
396 header "system_error"
397 export *
398 }
399 module thread {
400 header "thread"
401 export *
402 }
403 module tuple {
404 header "tuple"
405 export *
406 }
407 module type_traits {
408 header "type_traits"
409 export *
410 }
411 module typeindex {
412 header "typeindex"
413 export *
414 }
415 module typeinfo {
416 header "typeinfo"
417 export *
418 }
419 module unordered_map {
420 header "unordered_map"
421 export initializer_list
422 export *
423 }
424 module unordered_set {
425 header "unordered_set"
426 export initializer_list
427 export *
428 }
429 module utility {
430 header "utility"
431 export initializer_list
432 export *
433 }
434 module valarray {
435 header "valarray"
436 export initializer_list
437 export *
438 }
439 module vector {
440 header "vector"
441 export initializer_list
442 export *
443 }
444
Richard Smith2d1b6372015-10-13 22:13:33 +0000445 // FIXME: We don't have modules for the <foo.h> headers, because they might
446 // be included from the C library's headers, and that would create a #include
447 // cycle. For the same reason, we don't have a module for __config.
448 //module __config { header "__config" export * }
449
Richard Smith31cfef02014-05-21 00:33:49 +0000450 // FIXME: These should be private.
451 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000452 module __debug { header "__debug" export * }
453 module __functional_base { header "__functional_base" export * }
454 module __hash_table { header "__hash_table" export * }
455 module __locale { header "__locale" export * }
456 module __mutex_base { header "__mutex_base" export * }
457 module __split_buffer { header "__split_buffer" export * }
458 module __sso_allocator { header "__sso_allocator" export * }
459 module __std_stream { header "__std_stream" export * }
460 module __tree { header "__tree" export * }
461 module __tuple { header "__tuple" export * }
462 module __undef_min_max { header "__undef_min_max" export * }
Saleem Abdulrasooldcf27a62015-02-13 22:15:32 +0000463 module __undef___deallocate { header "__undef___deallocate" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000464}