Skip to content

Commit

Permalink
[libcxx] [modules] Add _LIBCPP_USING_IF_EXISTS on aligned_alloc (#89827)
Browse files Browse the repository at this point in the history
This is missing e.g. on Windows. With this change, it's possible to make
the libcxx std module work on mingw-w64 (although that requires a few
fixes to those headers).

In the regular cstdlib header, we have _LIBCPP_USING_IF_EXISTS flagged
on every single reexported function (since
a9c9183), but the modules seem to only
have _LIBCPP_USING_IF_EXISTS set on a few individual functions, so far.
  • Loading branch information
mstorsjo authored Apr 24, 2024
1 parent 4616368 commit 91526d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/modules/std.compat/cstdlib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export {
using ::system;

// [c.malloc], C library memory allocation
using ::aligned_alloc;
using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
using ::calloc;
using ::free;
using ::malloc;
Expand Down

0 comments on commit 91526d6

Please sign in to comment.