Skip to content

Commit 5d04571

Browse files
committed
[Platform] Rename modules for C library headers to match Darwin.
The Darwin headers have a naming convention for these modules; we should match it. rdar://123503615
1 parent 637b79e commit 5d04571

File tree

1 file changed

+81
-81
lines changed

1 file changed

+81
-81
lines changed

stdlib/public/Platform/musl.modulemap

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -51,264 +51,264 @@ module _musl [system] {
5151
// Headers that can be overridden by Clang or libc++; in this case what we do is
5252
// we create an underscored module to wrap the actual header, then have the
5353
// module with the nicer name include a forwarding header from _modules. This
54-
// ensures that e.g. `import stdc_float` will result in pulling in the Clang
54+
// ensures that e.g. `import float_h` will result in pulling in the Clang
5555
// or libc++ versions as expected.
5656

57-
module _stdc_assert [system] {
57+
module _assert [system] {
5858
textual header "assert.h"
5959
}
60-
module stdc_assert [system] {
61-
header "_modules/stdc_assert.h"
60+
module assert_h [system] {
61+
header "_modules/assert_h.h"
6262
export *
6363
}
6464

65-
module _stdc_complex [system] {
65+
module _complex [system] {
6666
header "complex.h"
6767
export *
6868
}
69-
module stdc_complex [system] {
70-
header "_modules/stdc_complex.h"
69+
module complex_h [system] {
70+
header "_modules/complex_h.h"
7171
export *
7272
}
7373

74-
module _stdc_ctype [system] {
74+
module _ctype [system] {
7575
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
7676
header "ctype.h"
7777
export *
7878
}
79-
module stdc_ctype [system] {
80-
header "_modules/stdc_ctype.h"
79+
module ctype_h [system] {
80+
header "_modules/ctype_h.h"
8181
export *
8282
}
8383

84-
module _stdc_errno [system] {
84+
module _errno [system] {
8585
config_macros _GNU_SOURCE
8686
header "errno.h"
8787
export *
8888
}
89-
module stdc_errno [system] {
90-
header "_modules/stdc_errno.h"
89+
module errno_h [system] {
90+
header "_modules/errno_h.h"
9191
export *
9292
}
9393

94-
module _stdc_fenv [system] {
94+
module _fenv [system] {
9595
header "fenv.h"
9696
export *
9797
}
98-
module stdc_fenv [system] {
99-
header "_modules/stdc_fenv.h"
98+
module fenv_h [system] {
99+
header "_modules/fenv_h.h"
100100
export *
101101
}
102102

103-
module _stdc_float [system] {
103+
module _float [system] {
104104
header "float.h"
105105
export *
106106
}
107-
module stdc_float [system] {
108-
header "_modules/stdc_float.h"
107+
module float_h [system] {
108+
header "_modules/float_h.h"
109109
export *
110110
}
111111

112-
module _stdc_inttypes [system] {
112+
module _inttypes [system] {
113113
header "inttypes.h"
114114
export *
115115
}
116-
module stdc_inttypes [system] {
117-
header "_modules/stdc_inttypes.h"
118-
use stdc_stdint
116+
module inttypes_h [system] {
117+
header "_modules/inttypes_h.h"
118+
use stdint_h
119119
export *
120120
}
121121

122-
module _stdc_iso646 [system] {
122+
module _iso646 [system] {
123123
header "iso646.h"
124124
export *
125125
}
126-
module stdc_iso646 [system] {
127-
header "_modules/stdc_iso646.h"
126+
module iso646_h [system] {
127+
header "_modules/iso646_h.h"
128128
export *
129129
}
130130

131-
module _stdc_limits [system] {
131+
module _limits [system] {
132132
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
133133
header "limits.h"
134134
export *
135135
}
136-
module stdc_limits [system] {
137-
header "_modules/stdc_limits.h"
136+
module limits_h [system] {
137+
header "_modules/limits_h.h"
138138
export *
139139
}
140140

141-
module _stdc_locale [system] {
141+
module _locale [system] {
142142
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
143143
header "locale.h"
144144
export *
145145
}
146-
module stdc_locale [system] {
147-
header "_modules/stdc_locale.h"
146+
module locale_h [system] {
147+
header "_modules/locale_h.h"
148148
export *
149149
}
150150

151-
module _stdc_math [system] {
151+
module _math [system] {
152152
config_macros _BSD_SOURCE, _GNU_SOURCE, _XOPEN_SOURCE
153153
header "math.h"
154154
export *
155155
}
156-
module stdc_math [system] {
157-
header "_modules/stdc_math.h"
156+
module math_h [system] {
157+
header "_modules/math_h.h"
158158
export *
159159
}
160160

161-
module _stdc_setjmp [system] {
161+
module _setjmp [system] {
162162
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
163163
header "setjmp.h"
164164
export *
165165
}
166-
module stdc_setjmp [system] {
167-
header "_modules/stdc_setjmp.h"
166+
module setjmp_h [system] {
167+
header "_modules/setjmp_h.h"
168168
export *
169169
}
170170

171-
module _stdc_stdalign [system] {
171+
module _stdalign [system] {
172172
header "stdalign.h"
173173
export *
174174
}
175-
module stdc_stdalign [system] {
176-
header "_modules/stdc_stdalign.h"
175+
module stdalign_h [system] {
176+
header "_modules/stdalign_h.h"
177177
export *
178178
}
179179

180-
module _stdc_stdarg [system] {
180+
module _stdarg [system] {
181181
header "stdarg.h"
182182
export *
183183
}
184-
module stdc_stdarg [system] {
185-
header "_modules/stdc_stdarg.h"
184+
module stdarg_h [system] {
185+
header "_modules/stdarg_h.h"
186186
export *
187187
}
188188

189-
module _stdc_stdatomic [system] {
189+
module _stdatomic [system] {
190190
header "stdatomic.h"
191191
export *
192192
}
193-
module stdc_stdatomic [system] {
194-
header "_modules/stdc_stdatomic.h"
193+
module stdatomic_h [system] {
194+
header "_modules/stdatomic_h.h"
195195
export *
196196
}
197197

198-
module _stdc_stdbool [system] {
198+
module _stdbool [system] {
199199
header "stdbool.h"
200200
export *
201201
}
202-
module stdc_stdbool [system] {
203-
header "_modules/stdc_stdbool.h"
202+
module stdbool_h [system] {
203+
header "_modules/stdbool_h.h"
204204
export *
205205
}
206206

207-
module _stdc_stddef [system] {
207+
module _stddef [system] {
208208
header "stddef.h"
209209
export *
210210
}
211-
module stdc_stddef [system] {
212-
header "_modules/stdc_stddef.h"
211+
module stddef_h [system] {
212+
header "_modules/stddef_h.h"
213213
export *
214214
}
215215

216-
module _stdc_stdint [system] {
216+
module _stdint [system] {
217217
header "stdint.h"
218218
export *
219219
}
220-
module stdc_stdint [system] {
221-
header "_modules/stdc_stdint.h"
220+
module stdint_h [system] {
221+
header "_modules/stdint_h.h"
222222
export *
223223
}
224224

225-
module _stdc_stdio [system] {
225+
module _stdio [system] {
226226
config_macros _BSD_SOURCE, _GNU_SOURCE, _LARGEFILE64_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
227227
header "stdio.h"
228228
export *
229229
}
230-
module stdc_stdio [system] {
231-
header "_modules/stdc_stdio.h"
230+
module stdio_h [system] {
231+
header "_modules/stdio_h.h"
232232
export *
233233
}
234234

235-
module _stdc_stdlib [system] {
235+
module _stdlib [system] {
236236
config_macros _BSD_SOURCE, _GNU_SOURCE, _LARGEFILE64_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
237237
header "stdlib.h"
238238
export *
239239
}
240-
module stdc_stdlib [system] {
241-
header "_modules/stdc_stdlib.h"
240+
module stdlib_h [system] {
241+
header "_modules/stdlib_h.h"
242242
export *
243243
}
244244

245-
module _stdc_string [system] {
245+
module _string [system] {
246246
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
247247
header "string.h"
248248
export *
249249
}
250-
module stdc_string [system] {
251-
header "_modules/stdc_string.h"
250+
module string_h [system] {
251+
header "_modules/string_h.h"
252252
export *
253253
}
254254

255-
module _stdc_tgmath [system] {
255+
module _tgmath [system] {
256256
header "tgmath.h"
257257
export *
258258
}
259-
module stdc_tgmath [system] {
260-
header "_modules/stdc_tgmath.h"
259+
module tgmath_h [system] {
260+
header "_modules/tgmath_h.h"
261261
export *
262262
}
263263

264-
module _stdc_uchar [system] {
264+
module _uchar [system] {
265265
header "uchar.h"
266266
export *
267267
}
268-
module stdc_uchar [system] {
269-
header "_modules/stdc_uchar.h"
268+
module uchar_h [system] {
269+
header "_modules/uchar_h.h"
270270
export *
271271
}
272272

273-
module _stdc_wchar [system] {
273+
module _wchar [system] {
274274
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
275275
header "wchar.h"
276276
export *
277277
}
278-
module stdc_wchar [system] {
279-
header "_modules/stdc_wchar.h"
278+
module wchar_h [system] {
279+
header "_modules/wchar_h.h"
280280
export *
281281
}
282282

283-
module _stdc_wctype [system] {
283+
module _wctype [system] {
284284
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
285285
header "wctype.h"
286286
export *
287287
}
288-
module stdc_wctype [system] {
289-
header "_modules/stdc_wctype.h"
288+
module wctype_h [system] {
289+
header "_modules/wctype_h.h"
290290
export *
291291
}
292292

293293
// C library headers
294-
module stdc_time [system] {
294+
module time_h [system] {
295295
config_macros _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, _BSD_SOURCE
296296
header "time.h"
297297
export *
298298
}
299299

300-
module stdc_signal [system] {
300+
module signal_h [system] {
301301
config_macros _BSD_SOURCE, _GNU_SOURCE, _POSIX_C_SOURCE, _POSIX_SOURCE, _XOPEN_SOURCE
302302
header "signal.h"
303303
export *
304304
}
305305

306-
module stdc_stdnoreturn [system] {
306+
module stdnoreturn_h [system] {
307307
header "stdnoreturn.h"
308308
export *
309309
}
310310

311-
module stdc_threads [system] {
311+
module threads_h [system] {
312312
header "threads.h"
313313
export *
314314
}

0 commit comments

Comments
 (0)