From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 32867388E839; Wed, 17 Jun 2020 19:29:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32867388E839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592422158; bh=woobA1ZUoMhKcR4LSsRG4JlYJQ91UaPwvK9M+hTok6U=; h=From:To:Subject:Date:From; b=XfNf6ma1zfkwBeDyuWaQcLixXkZi9Q/Lr0rHvk4R2ORhjkseM1AX/H5pQQLtsGeGv QDB97xyGzI2pdn43sFg/OsFWA05191dxRnlpEbeTFp95VDzLZ+PkqkrfYyDja80n9P C1qXqRa8N/7ikq+GxIjw9O+eKqlXXayxtaePDdtY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/ranger] libstdc++: Deal with ENOSYS == ENOTSUP X-Act-Checkin: gcc X-Git-Author: Andreas Krebbel X-Git-Refname: refs/heads/devel/ranger X-Git-Oldrev: eb637e76047a3b1d9787b1c75de5da3db2fe8aea X-Git-Newrev: 28119fba7f1a3c96dde58905277eac4de148f210 Message-Id: <20200617192918.32867388E839@sourceware.org> Date: Wed, 17 Jun 2020 19:29:18 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 19:29:18 -0000 https://gcc.gnu.org/g:28119fba7f1a3c96dde58905277eac4de148f210 commit 28119fba7f1a3c96dde58905277eac4de148f210 Author: Andreas Krebbel 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 * 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 + + * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it + would match ENOSYS. + 2020-03-05 Jonathan Wakely * 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