Don't check STREAMS error numbers on systems that don't implement the obsolete (as described in POSIX2008) XSI STREAMS extension.

llvm-svn: 140248
diff --git a/libcxx/test/diagnostics/errno/cerrno.pass.cpp b/libcxx/test/diagnostics/errno/cerrno.pass.cpp
index f66ab85..c6743fb 100644
--- a/libcxx/test/diagnostics/errno/cerrno.pass.cpp
+++ b/libcxx/test/diagnostics/errno/cerrno.pass.cpp
@@ -180,9 +180,11 @@
 #error ENOBUFS not defined
 #endif
 
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
 #ifndef ENODATA
 #error ENODATA not defined
 #endif
+#endif
 
 #ifndef ENODEV
 #error ENODEV not defined
@@ -220,13 +222,17 @@
 #error ENOSPC not defined
 #endif
 
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
 #ifndef ENOSR
 #error ENOSR not defined
 #endif
+#endif
 
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
 #ifndef ENOSTR
 #error ENOSTR not defined
 #endif
+#endif
 
 #ifndef ENOSYS
 #error ENOSYS not defined
@@ -312,9 +318,11 @@
 #error ESRCH not defined
 #endif
 
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
 #ifndef ETIME
 #error ETIME not defined
 #endif
+#endif
 
 #ifndef ETIMEDOUT
 #error ETIMEDOUT not defined