From patchwork Fri Dec 10 14:07:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 48782 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7B7A385803F for ; Fri, 10 Dec 2021 14:08:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7B7A385803F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1639145309; bh=Knydso/iP0nCi4OZXnS/DTaVscn/MvI+oCMY3EIkJsA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=UWEMHBrT6pVVhOAIpLemgqop46mJzkH9gwtiqcWB/EANFm2DyNdizc5qfbEueQ5Ap E/I21h4r2QEkySXRF3wkFZSUxfBqQ34+gvJRTrm5FfIiY/cHk6ysQ+N3eRzrvhOjxj Yql9oyRcbWrZww35irPUTnb6F7e/HzlHzp3Bti/o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 1DA15385802B for ; Fri, 10 Dec 2021 14:07:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1DA15385802B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-585-Pf7yPpPINAe5GFLgMpnhQg-1; Fri, 10 Dec 2021 09:07:25 -0500 X-MC-Unique: Pf7yPpPINAe5GFLgMpnhQg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58F5A100CCC2; Fri, 10 Dec 2021 14:07:24 +0000 (UTC) Received: from localhost (unknown [10.33.36.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A1B95E26C; Fri, 10 Dec 2021 14:07:23 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix definition of _GLIBCXX_NO_SLEEP config macro Date: Fri, 10 Dec 2021 14:07:23 +0000 Message-Id: <20211210140723.1642806-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.9 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_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested powerpc64le-linux --enable-threads={posix,single}, pushed to trunk. If no OS function to sleep (e.g. nanosleep, usleep, Win32 Sleep etc.) is available then configure defines the macro NO_SLEEP. But this will not get prefixed with "_GLIBCXX_" because include/Makefile.am only does that for macros beginning with "HAVE_". The configure script should define _GLIBCXX_NO_SLEEP instead (which is what the code actually checks for). libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add _GLIBCXX_ prefix to NO_SLEEP macro. * config.h.in: Regenerate. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 2 +- libstdc++-v3/config.h.in | 6 +++--- libstdc++-v3/configure | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 6d9a8875e31..635168d7e25 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1562,7 +1562,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ fi if test x"$ac_no_sleep" = x"yes"; then - AC_DEFINE(NO_SLEEP,1, [Defined if no way to sleep is available.]) + AC_DEFINE(_GLIBCXX_NO_SLEEP,1, [Defined if no way to sleep is available.]) fi AC_SUBST(GLIBCXX_LIBS) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 420021fcb1a..10675fe2530 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -714,9 +714,6 @@ */ #undef LT_OBJDIR -/* Defined if no way to sleep is available. */ -#undef NO_SLEEP - /* Name of package */ #undef PACKAGE @@ -838,6 +835,9 @@ /* Define if C99 llrint and llround functions are missing from . */ #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS +/* Defined if no way to sleep is available. */ +#undef _GLIBCXX_NO_SLEEP + /* Define if ptrdiff_t is int. */ #undef _GLIBCXX_PTRDIFF_T_IS_INT diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 61a14a2cb3b..b1a0157d0b9 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -21006,7 +21006,7 @@ $as_echo "$ac_has_win32_sleep" >&6; } if test x"$ac_no_sleep" = x"yes"; then -$as_echo "#define NO_SLEEP 1" >>confdefs.h +$as_echo "#define _GLIBCXX_NO_SLEEP 1" >>confdefs.h fi