From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5C26B385841C for ; Fri, 13 Jan 2023 00:15:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C26B385841C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673568955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ymSrtqGQJmWzQk1jHbsbQCgo66DyV1CWGtgqnweD8E=; b=aLQ1HQLz12ZbweSSAnVr65M2ZVmB+UJ8/7Tznl9wG73X8tIKDvr7/PfV3V5rqitB6ToKj0 oPvzNoZPpW9BaVJXD76mxi06lox5IV6wDYhuWOL4gAA17l0oQ3qT2VBMw1S6nCGwtDneYO oesyqospKRkN+tALTptwqaeuXQhsaWQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-602-q2EQErMwMgOhWJrS6KOQdA-1; Thu, 12 Jan 2023 19:15:48 -0500 X-MC-Unique: q2EQErMwMgOhWJrS6KOQdA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B967085A588; Fri, 13 Jan 2023 00:15:47 +0000 (UTC) Received: from localhost (unknown [10.33.36.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82F61492C14; Fri, 13 Jan 2023 00:15:47 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Do not include in concurrency headers Date: Fri, 13 Jan 2023 00:15:46 +0000 Message-Id: <20230113001546.944147-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. -- >8 -- The , , and headers use std::errc constants, but don't use std::system_error itself. They only use the __throw_system_error(int) function, which is defined in . By including the header for the errc constants instead of the whole of we avoid depending on the whole std::string definition. libstdc++-v3/ChangeLog: * include/bits/std_mutex.h: Remove include. * include/std/condition_variable: Add include. * include/std/mutex: Likewise. * include/std/shared_mutex: Likewise. --- libstdc++-v3/include/bits/std_mutex.h | 1 - libstdc++-v3/include/std/condition_variable | 3 ++- libstdc++-v3/include/std/mutex | 2 +- libstdc++-v3/include/std/shared_mutex | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/bits/std_mutex.h b/libstdc++-v3/include/bits/std_mutex.h index 68f5fb9ed65..bc515358d23 100644 --- a/libstdc++-v3/include/bits/std_mutex.h +++ b/libstdc++-v3/include/bits/std_mutex.h @@ -36,7 +36,6 @@ # include #else -#include #include #include diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index b885e1baa1b..f671fe4afe1 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -38,6 +38,7 @@ #else #include +#include #include #include #include @@ -372,7 +373,7 @@ _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2) { return __p(); } - + std::stop_callback __cb(__stoken, [this] { notify_all(); }); shared_ptr __mutex = _M_mutex; while (!__p()) diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index aca5f91e03c..4eedbe5038c 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -40,8 +40,8 @@ #include #include #include -#include #include +#include #include #include #if ! _GTHREAD_USE_MUTEX_TIMEDLOCK diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex index 7b70697f178..57c3cc54d81 100644 --- a/libstdc++-v3/include/std/shared_mutex +++ b/libstdc++-v3/include/std/shared_mutex @@ -36,6 +36,7 @@ #if __cplusplus >= 201402L #include +#include #include #include // move, __exchange #include // defer_lock_t -- 2.39.0