Linux: Correctly identify valid error codes
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 29 May 2014 05:02:22 +0000 (05:02 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 29 May 2014 05:02:22 +0000 (05:02 +0000)
commit31234844ef002f718d5ab3588535e12ac53819d4
tree183a3a6198e611f9777a47e18f893628ec5c3788
parent195d8ef452a0712105a88194848db736d415f3c2
Linux: Correctly identify valid error codes

[syserr.errcat.objects]p4 specifies that
system_category().default_error_condition(ev) map to
error_condition(posv, generic_category()) if ev could map to a POSIX
errno.

Linux reserves up to and including 4095 for errno values, use this as a
bound.

This fixes syserr.errcat.objects/system_category.pass.cpp on Linux.

llvm-svn: 209795
libcxx/src/ios.cpp
libcxx/src/system_error.cpp
libcxx/test/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp