[PATCH] D34294: Rework libcxx strerror_r handling.

2017-07-19 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308528: Rework libcxx strerror_r handling. (authored by jyknight). Repository: rL LLVM https://reviews.llvm.org/D34294 Files: libcxx/trunk/src/system_error.cpp Index:

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-20 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. EricWF, wdyt? https://reviews.llvm.org/D34294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D34294#782856, @jyknight wrote: > In https://reviews.llvm.org/D34294#782806, @krytarowski wrote: > > > New one is harder to comprehend and less portable (usage of `__atribute__`). > > > I can't disagree more strongly. This is

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-16 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In https://reviews.llvm.org/D34294#782806, @krytarowski wrote: > New one is harder to comprehend and less portable (usage of `__atribute__`). I can't disagree more strongly. This is fundamentally portable C++ code -- __attribute__((unused)) is simply warning

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Or better: #elif __GLIBC__ || (__ANDROID_API__ - 0) >= 23 If I understand correctly, Android adopted GNU version. https://reviews.llvm.org/D34294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. New one is harder to comprehend and less portable (usage of `__atribute__`). Can we just replace #elif defined(__linux__) && !defined(_LIBCPP_HAS_MUSL_LIBC) && \ (!defined(__ANDROID__) || __ANDROID_API__ >= 23) with `#elif __GLIBC__`?

[PATCH] D34294: Rework libcxx strerror_r handling.

2017-06-16 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. Herald added subscribers: krytarowski, srhines. The set of #ifdefs used to handle the two incompatible variants of strerror_r were not complete (they didn't handle newlib appropriately). Rather than attempting to make the ifdefs more complex, make them unnecessary