AIX system's stdlib.h provide different overload of abs and div depending on compiler versions.
For example, std::div(long, long) and std::abs(long) are not available from OS's stdlib.h when building with clang, but they are available when building with xlclang compiler.
Therefore, we need to provide those extra overloads in libc++'s stdlib.h when OS's stdlib.h does not.
Details
- Reviewers
hubert.reinterpretcast daltenty xingxue ldionne - Group Reviewers
Restricted Project - Commits
- rGf3d7536b24f1: [libc++] Fix abs and div overload issue for compilers on AIX
Diff Detail
Event Timeline
libcxx/include/stdlib.h | ||
---|---|---|
105–115 | I think this is the equivalent of what you have (just significantly disentangled, and making it more obvious that we don't know why __sun__ is in there 😛). What do you think? |
Remove extra conditions because we only intended to target the headers for clang compilers.
libcxx/include/stdlib.h | ||
---|---|---|
105–115 | Thanks Author. |
I think this is the equivalent of what you have (just significantly disentangled, and making it more obvious that we don't know why __sun__ is in there 😛). What do you think?
I'd also want to see a similar disentangling performed for the floating-point abses.