[cfe-commits] [libcxx] r140248 - in /libcxx/trunk/test/diagnostics: errno/cerrno.pass.cpp syserr/errc.pass.cpp

David Chisnall csdavec at swan.ac.uk
Wed Sep 21 05:23:11 PDT 2011


Author: theraven
Date: Wed Sep 21 07:23:11 2011
New Revision: 140248

URL: http://llvm.org/viewvc/llvm-project?rev=140248&view=rev
Log:
Don't check STREAMS error numbers on systems that don't implement the obsolete (as described in POSIX2008) XSI STREAMS extension.


Modified:
    libcxx/trunk/test/diagnostics/errno/cerrno.pass.cpp
    libcxx/trunk/test/diagnostics/syserr/errc.pass.cpp

Modified: libcxx/trunk/test/diagnostics/errno/cerrno.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/diagnostics/errno/cerrno.pass.cpp?rev=140248&r1=140247&r2=140248&view=diff
==============================================================================
--- libcxx/trunk/test/diagnostics/errno/cerrno.pass.cpp (original)
+++ libcxx/trunk/test/diagnostics/errno/cerrno.pass.cpp Wed Sep 21 07:23:11 2011
@@ -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

Modified: libcxx/trunk/test/diagnostics/syserr/errc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/diagnostics/syserr/errc.pass.cpp?rev=140248&r1=140247&r2=140248&view=diff
==============================================================================
--- libcxx/trunk/test/diagnostics/syserr/errc.pass.cpp (original)
+++ libcxx/trunk/test/diagnostics/syserr/errc.pass.cpp Wed Sep 21 07:23:11 2011
@@ -55,18 +55,24 @@
     static_assert(std::errc::no_child_process == ECHILD, "");
     static_assert(std::errc::no_link == ENOLINK, "");
     static_assert(std::errc::no_lock_available == ENOLCK, "");
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
     static_assert(std::errc::no_message_available == ENODATA, "");
+#endif
     static_assert(std::errc::no_message == ENOMSG, "");
     static_assert(std::errc::no_protocol_option == ENOPROTOOPT, "");
     static_assert(std::errc::no_space_on_device == ENOSPC, "");
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
     static_assert(std::errc::no_stream_resources == ENOSR, "");
+#endif
     static_assert(std::errc::no_such_device_or_address == ENXIO, "");
     static_assert(std::errc::no_such_device == ENODEV, "");
     static_assert(std::errc::no_such_file_or_directory == ENOENT, "");
     static_assert(std::errc::no_such_process == ESRCH, "");
     static_assert(std::errc::not_a_directory == ENOTDIR, "");
     static_assert(std::errc::not_a_socket == ENOTSOCK, "");
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
     static_assert(std::errc::not_a_stream == ENOSTR, "");
+#endif
     static_assert(std::errc::not_connected == ENOTCONN, "");
     static_assert(std::errc::not_enough_memory == ENOMEM, "");
     static_assert(std::errc::not_supported == ENOTSUP, "");
@@ -84,7 +90,9 @@
     static_assert(std::errc::resource_unavailable_try_again == EAGAIN, "");
     static_assert(std::errc::result_out_of_range == ERANGE, "");
     static_assert(std::errc::state_not_recoverable == ENOTRECOVERABLE, "");
+#if (defined(_XOPEN_STREAMS) && _XOPEN_STREAMS != -1)
     static_assert(std::errc::stream_timeout == ETIME, "");
+#endif
     static_assert(std::errc::text_file_busy == ETXTBSY, "");
     static_assert(std::errc::timed_out == ETIMEDOUT, "");
     static_assert(std::errc::too_many_files_open_in_system == ENFILE, "");





More information about the cfe-commits mailing list