public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/ranger] libstdc++: Deal with ENOSYS == ENOTSUP
@ 2020-06-17 19:29 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2020-06-17 19:29 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:28119fba7f1a3c96dde58905277eac4de148f210

commit 28119fba7f1a3c96dde58905277eac4de148f210
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date:   Fri Mar 6 09:37:55 2020 +0100

    libstdc++: Deal with ENOSYS == ENOTSUP
    
    zTPF uses the same numeric value for ENOSYS and ENOTSUP.
    
    libstdc++-v3/ChangeLog:
    
    2020-03-06  Andreas Krebbel  <krebbel@linux.ibm.com>
    
            * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
            would match ENOSYS.

Diff:
---
 libstdc++-v3/ChangeLog                 | 5 +++++
 libstdc++-v3/src/c++11/system_error.cc | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8c94885ff29..644a18ad39f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-06  Andreas Krebbel  <krebbel@linux.ibm.com>
+
+	* src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
+	would match ENOSYS.
+
 2020-03-05  Jonathan Wakely  <jwakely@redhat.com>
 
 	* testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
diff --git a/libstdc++-v3/src/c++11/system_error.cc b/libstdc++-v3/src/c++11/system_error.cc
index 7844afe6d2a..1f06e67feea 100644
--- a/libstdc++-v3/src/c++11/system_error.cc
+++ b/libstdc++-v3/src/c++11/system_error.cc
@@ -251,7 +251,8 @@ namespace
 #ifdef ENOTSOCK
       case ENOTSOCK:
 #endif
-#ifdef ENOTSUP
+#if defined ENOTSUP && (!defined ENOSYS || ENOTSUP != ENOSYS)
+      // zTPF uses the same value for ENOSYS and ENOTSUP
       case ENOTSUP:
 #endif
 #ifdef ENOTTY


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-17 19:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 19:29 [gcc/devel/ranger] libstdc++: Deal with ENOSYS == ENOTSUP Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).