blob: bcf4632d8549261241df4dca3475f77f0faab979 [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 Fiselier656e4732016-11-22 20:00:21 +000048 // FIXME: <stdint.h> is missing.
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000049 module stdio_h {
50 // <stdio.h>'s __need_* macros require textual inclusion.
51 textual header "stdio.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000052 export *
53 }
54 module stdlib_h {
55 // <stdlib.h>'s __need_* macros require textual inclusion.
56 textual header "stdlib.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000057 export *
58 }
59 module string_h {
60 header "string.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000061 export *
62 }
63 // FIXME: <uchar.h> is missing.
64 // <time.h> provided by C library.
65 module wchar_h {
66 // <wchar.h>'s __need_* macros require textual inclusion.
67 textual header "wchar.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000068 export *
69 }
70 module wctype_h {
71 header "wctype.h"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +000072 export *
73 }
74 }
75
76 // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
77 // allow their use in extern "C" contexts.
78 module complex_h {
79 header "complex.h"
80 export ccomplex
81 export *
82 }
83 module tgmath_h {
84 header "tgmath.h"
85 export ccomplex
86 export cmath
87 export *
88 }
89
90 // C compatibility headers.
91 module compat {
92 module cassert {
93 // <cassert>'s use of NDEBUG requires textual inclusion.
94 textual header "cassert"
95 }
96 module ccomplex {
97 header "ccomplex"
98 export complex
99 export *
100 }
101 module cctype {
102 header "cctype"
103 export *
104 }
105 module cerrno {
106 header "cerrno"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000107 export *
108 }
109 module cfenv {
110 header "cfenv"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000111 export *
112 }
113 module cfloat {
114 header "cfloat"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000115 export *
116 }
117 module cinttypes {
118 header "cinttypes"
119 export cstdint
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000120 export *
121 }
122 module ciso646 {
123 header "ciso646"
124 export *
125 }
126 module climits {
127 header "climits"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000128 export *
129 }
130 module clocale {
131 header "clocale"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000132 export *
133 }
134 module cmath {
135 header "cmath"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000136 export *
137 }
138 module csetjmp {
139 header "csetjmp"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000140 export *
141 }
142 module csignal {
143 header "csignal"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000144 export *
145 }
146 // FIXME: <cstdalign> is missing.
147 module cstdarg {
148 header "cstdarg"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000149 export *
150 }
151 module cstdbool {
152 header "cstdbool"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000153 export *
154 }
155 module cstddef {
156 header "cstddef"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000157 export *
158 }
159 module cstdint {
160 header "cstdint"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000161 export *
162 }
163 module cstdio {
164 header "cstdio"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000165 export *
166 }
167 module cstdlib {
168 header "cstdlib"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000169 export *
170 }
171 module cstring {
172 header "cstring"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000173 export *
174 }
175 module ctgmath {
176 header "ctgmath"
177 export ccomplex
178 export cmath
179 export *
180 }
181 module ctime {
182 header "ctime"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000183 export *
184 }
185 // FIXME: <cuchar> is missing.
186 module cwchar {
187 header "cwchar"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000188 export *
189 }
190 module cwctype {
191 header "cwctype"
Bruno Cardoso Lopes7fd29e02016-10-21 03:14:27 +0000192 export *
193 }
194 }
195
Richard Smith31cfef02014-05-21 00:33:49 +0000196 module algorithm {
197 header "algorithm"
198 export initializer_list
199 export *
200 }
201 module array {
202 header "array"
203 export initializer_list
204 export *
205 }
206 module atomic {
207 header "atomic"
208 export *
Nico Webera6789802014-09-24 04:44:54 +0000209 requires cplusplus11
Richard Smith31cfef02014-05-21 00:33:49 +0000210 }
211 module bitset {
212 header "bitset"
213 export string
214 export iosfwd
215 export *
216 }
217 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000218 module chrono {
219 header "chrono"
220 export *
221 }
Richard Smith31cfef02014-05-21 00:33:49 +0000222 module codecvt {
223 header "codecvt"
224 export *
225 }
226 module complex {
227 header "complex"
228 export *
229 }
230 module condition_variable {
231 header "condition_variable"
232 export *
233 }
Richard Smith31cfef02014-05-21 00:33:49 +0000234 module deque {
235 header "deque"
236 export initializer_list
237 export *
238 }
239 module exception {
240 header "exception"
241 export *
242 }
243 module forward_list {
244 header "forward_list"
245 export initializer_list
246 export *
247 }
248 module fstream {
249 header "fstream"
250 export *
251 }
252 module functional {
253 header "functional"
254 export *
255 }
256 module future {
257 header "future"
258 export *
259 }
260 module initializer_list {
261 header "initializer_list"
262 export *
263 }
264 module iomanip {
265 header "iomanip"
266 export *
267 }
268 module ios {
269 header "ios"
270 export iosfwd
271 export *
272 }
273 module iosfwd {
274 header "iosfwd"
275 export *
276 }
277 module iostream {
278 header "iostream"
279 export ios
280 export streambuf
281 export istream
282 export ostream
283 export *
284 }
285 module istream {
286 header "istream"
287 // FIXME: should re-export ios, streambuf?
288 export *
289 }
290 module iterator {
291 header "iterator"
292 export *
293 }
294 module limits {
295 header "limits"
296 export *
297 }
298 module list {
299 header "list"
300 export initializer_list
301 export *
302 }
303 module locale {
304 header "locale"
305 export *
306 }
307 module map {
308 header "map"
309 export initializer_list
310 export *
311 }
312 module memory {
313 header "memory"
314 export *
315 }
316 module mutex {
317 header "mutex"
318 export *
319 }
320 module new {
321 header "new"
322 export *
323 }
324 module numeric {
325 header "numeric"
326 export *
327 }
328 module ostream {
329 header "ostream"
330 // FIXME: should re-export ios, streambuf?
331 export *
332 }
333 module queue {
334 header "queue"
335 export initializer_list
336 export *
337 }
338 module random {
339 header "random"
340 export initializer_list
341 export *
342 }
343 module ratio {
344 header "ratio"
345 export *
346 }
347 module regex {
348 header "regex"
349 export initializer_list
350 export *
351 }
352 module scoped_allocator {
353 header "scoped_allocator"
354 export *
355 }
356 module set {
357 header "set"
358 export initializer_list
359 export *
360 }
361 module sstream {
362 header "sstream"
363 // FIXME: should re-export istream, ostream, ios, streambuf, string?
364 export *
365 }
366 module stack {
367 header "stack"
368 export initializer_list
369 export *
370 }
371 module stdexcept {
372 header "stdexcept"
373 export *
374 }
375 module streambuf {
376 header "streambuf"
377 export *
378 }
379 module string {
380 header "string"
381 export initializer_list
382 export *
383 }
384 module strstream {
385 header "strstream"
386 requires !cplusplus11
387 }
388 module system_error {
389 header "system_error"
390 export *
391 }
392 module thread {
393 header "thread"
394 export *
395 }
396 module tuple {
397 header "tuple"
398 export *
399 }
400 module type_traits {
401 header "type_traits"
402 export *
403 }
404 module typeindex {
405 header "typeindex"
406 export *
407 }
408 module typeinfo {
409 header "typeinfo"
410 export *
411 }
412 module unordered_map {
413 header "unordered_map"
414 export initializer_list
415 export *
416 }
417 module unordered_set {
418 header "unordered_set"
419 export initializer_list
420 export *
421 }
422 module utility {
423 header "utility"
424 export initializer_list
425 export *
426 }
427 module valarray {
428 header "valarray"
429 export initializer_list
430 export *
431 }
432 module vector {
433 header "vector"
434 export initializer_list
435 export *
436 }
437
Richard Smith2d1b6372015-10-13 22:13:33 +0000438 // FIXME: We don't have modules for the <foo.h> headers, because they might
439 // be included from the C library's headers, and that would create a #include
440 // cycle. For the same reason, we don't have a module for __config.
441 //module __config { header "__config" export * }
442
Richard Smith31cfef02014-05-21 00:33:49 +0000443 // FIXME: These should be private.
444 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000445 module __debug { header "__debug" export * }
446 module __functional_base { header "__functional_base" export * }
447 module __hash_table { header "__hash_table" export * }
448 module __locale { header "__locale" export * }
449 module __mutex_base { header "__mutex_base" export * }
450 module __split_buffer { header "__split_buffer" export * }
451 module __sso_allocator { header "__sso_allocator" export * }
452 module __std_stream { header "__std_stream" export * }
453 module __tree { header "__tree" export * }
454 module __tuple { header "__tuple" export * }
455 module __undef_min_max { header "__undef_min_max" export * }
Saleem Abdulrasooldcf27a62015-02-13 22:15:32 +0000456 module __undef___deallocate { header "__undef___deallocate" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000457}