Rework libcxx strerror_r handling.
authorJames Y Knight <jyknight@google.com>
Wed, 19 Jul 2017 21:48:49 +0000 (21:48 +0000)
committerJames Y Knight <jyknight@google.com>
Wed, 19 Jul 2017 21:48:49 +0000 (21:48 +0000)
commit929f159777bec47c80a3b302f190261d426e1c3b
treec8e3eb78058b802662b9fd62c01cf5d780707a78
parent3610942c127be86ca1984c7bdc9f7c11a0cfabb8
Rework libcxx strerror_r handling.

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 by choosing which behavior to use dependent upon the
return type.

Reviewers: waltl

Differential Revision: https://reviews.llvm.org/D34294

llvm-svn: 308528
libcxx/src/system_error.cpp