MartinO added a comment.
The introduction of the macros '__NEWLIB__' and '__NEWLIB_MINOR__' appear to
have been first introduced in Newlib v2.3.0.20160226, but the new interface for
'' was introduced in Newlib v2.4.0.20160923 - previous releases of
v2.4.0 did not make these changes.
This is why the tests 'defined(__NEWLIB__)' and 'defined(__NEWLIB_MINOR__)' are
also necessary.
Unfortunately, I don't know of anyway of telling if Newlib v2.4.0 is the
20160923 version or an earlier version such as the original v2.4.0 release or
the 20160527 version which was the last version of Newlib that used the old
interface. There is no macro that provides this information and
'__NEWLIB_PATCHLEVEL__' is always '0' for each is these intermediate versions
(I don't know why they don't bump the patch number).
I've no comment about whether or not the '__POSIX_VISIBLE' test is required, it
was already present and I simply supplemented it with the Newlib version checks.
MartinO
https://reviews.llvm.org/D32146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits