blob: b050e5a59746f7507e33c89a9416c299e033e054 [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 *
Richard Smith31cfef02014-05-21 00:33:49 +0000216 }
217 module bitset {
218 header "bitset"
219 export string
220 export iosfwd
221 export *
222 }
223 // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
Richard Smith31cfef02014-05-21 00:33:49 +0000224 module chrono {
225 header "chrono"
226 export *
227 }
Richard Smith31cfef02014-05-21 00:33:49 +0000228 module codecvt {
229 header "codecvt"
230 export *
231 }
232 module complex {
233 header "complex"
234 export *
235 }
236 module condition_variable {
237 header "condition_variable"
238 export *
239 }
Richard Smith31cfef02014-05-21 00:33:49 +0000240 module deque {
241 header "deque"
242 export initializer_list
243 export *
244 }
245 module exception {
246 header "exception"
247 export *
248 }
249 module forward_list {
250 header "forward_list"
251 export initializer_list
252 export *
253 }
254 module fstream {
255 header "fstream"
256 export *
257 }
258 module functional {
259 header "functional"
260 export *
261 }
262 module future {
263 header "future"
264 export *
265 }
266 module initializer_list {
267 header "initializer_list"
268 export *
269 }
270 module iomanip {
271 header "iomanip"
272 export *
273 }
274 module ios {
275 header "ios"
276 export iosfwd
277 export *
278 }
279 module iosfwd {
280 header "iosfwd"
281 export *
282 }
283 module iostream {
284 header "iostream"
285 export ios
286 export streambuf
287 export istream
288 export ostream
289 export *
290 }
291 module istream {
292 header "istream"
293 // FIXME: should re-export ios, streambuf?
294 export *
295 }
296 module iterator {
297 header "iterator"
298 export *
299 }
300 module limits {
301 header "limits"
302 export *
303 }
304 module list {
305 header "list"
306 export initializer_list
307 export *
308 }
309 module locale {
310 header "locale"
311 export *
312 }
313 module map {
314 header "map"
315 export initializer_list
316 export *
317 }
318 module memory {
319 header "memory"
320 export *
321 }
322 module mutex {
323 header "mutex"
324 export *
325 }
326 module new {
327 header "new"
328 export *
329 }
330 module numeric {
331 header "numeric"
332 export *
333 }
334 module ostream {
335 header "ostream"
336 // FIXME: should re-export ios, streambuf?
337 export *
338 }
339 module queue {
340 header "queue"
341 export initializer_list
342 export *
343 }
344 module random {
345 header "random"
346 export initializer_list
347 export *
348 }
349 module ratio {
350 header "ratio"
351 export *
352 }
353 module regex {
354 header "regex"
355 export initializer_list
356 export *
357 }
358 module scoped_allocator {
359 header "scoped_allocator"
360 export *
361 }
362 module set {
363 header "set"
364 export initializer_list
365 export *
366 }
367 module sstream {
368 header "sstream"
369 // FIXME: should re-export istream, ostream, ios, streambuf, string?
370 export *
371 }
372 module stack {
373 header "stack"
374 export initializer_list
375 export *
376 }
377 module stdexcept {
378 header "stdexcept"
379 export *
380 }
381 module streambuf {
382 header "streambuf"
383 export *
384 }
385 module string {
386 header "string"
387 export initializer_list
388 export *
389 }
390 module strstream {
391 header "strstream"
Eric Fiselierbdc20862016-12-05 23:16:07 +0000392 export *
Richard Smith31cfef02014-05-21 00:33:49 +0000393 }
394 module system_error {
395 header "system_error"
396 export *
397 }
398 module thread {
399 header "thread"
400 export *
401 }
402 module tuple {
403 header "tuple"
404 export *
405 }
406 module type_traits {
407 header "type_traits"
408 export *
409 }
410 module typeindex {
411 header "typeindex"
412 export *
413 }
414 module typeinfo {
415 header "typeinfo"
416 export *
417 }
418 module unordered_map {
419 header "unordered_map"
420 export initializer_list
421 export *
422 }
423 module unordered_set {
424 header "unordered_set"
425 export initializer_list
426 export *
427 }
428 module utility {
429 header "utility"
430 export initializer_list
431 export *
432 }
433 module valarray {
434 header "valarray"
435 export initializer_list
436 export *
437 }
438 module vector {
439 header "vector"
440 export initializer_list
441 export *
442 }
443
Richard Smith2d1b6372015-10-13 22:13:33 +0000444 // FIXME: We don't have modules for the <foo.h> headers, because they might
445 // be included from the C library's headers, and that would create a #include
446 // cycle. For the same reason, we don't have a module for __config.
447 //module __config { header "__config" export * }
448
Richard Smith31cfef02014-05-21 00:33:49 +0000449 // FIXME: These should be private.
450 module __bit_reference { header "__bit_reference" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000451 module __debug { header "__debug" export * }
452 module __functional_base { header "__functional_base" export * }
453 module __hash_table { header "__hash_table" export * }
454 module __locale { header "__locale" export * }
455 module __mutex_base { header "__mutex_base" export * }
456 module __split_buffer { header "__split_buffer" export * }
457 module __sso_allocator { header "__sso_allocator" export * }
458 module __std_stream { header "__std_stream" export * }
459 module __tree { header "__tree" export * }
460 module __tuple { header "__tuple" export * }
461 module __undef_min_max { header "__undef_min_max" export * }
Saleem Abdulrasooldcf27a62015-02-13 22:15:32 +0000462 module __undef___deallocate { header "__undef___deallocate" export * }
Richard Smith31cfef02014-05-21 00:33:49 +0000463}