From nobody Sun Aug 13 04:37:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RNlBq3f2Dz4mSP5; Sun, 13 Aug 2023 04:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RNlBq2yWfz3YCY; Sun, 13 Aug 2023 04:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691901475; 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=M9JfjTf5CgKSI9u9d3TUZk4LiUE4CSDrshf0lBn0rSQ=; b=rD/C6E6u/dNf1wCTRJeQqSlc/BilasNSOH4iTJmTnyi5rGISQha9bqMe2ApkM4sCys7ps2 cNN+BK9VXPggL+6Ige6KDsoscEhZfsj3TrLPUD1s4nbA23FOKe1Bqx7ypaxNE/xJKW153D munSDWF2eigU/th5/cqYwNiGlh7QgbOJHsHs4hMYRNJ4qGiVjkVmFCXP+BZtprbzsdjfa7 x6OiuPG6htmkdghRRKEaJ8XRIsUL2jlM4hVeJewG0piv22gUd8ITdAWFlJHmNrbNJCKZmP tXAYXuTYmYNKFhG44ifrzZuoZOZyiLeX15qgrCfvrzPPbZk5LSHtRcm2YR2KYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691901475; 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=M9JfjTf5CgKSI9u9d3TUZk4LiUE4CSDrshf0lBn0rSQ=; b=rxkwbKMtTa5a5M7Zo4Dk3bVgVarQPYzUaY679RMR42KXHP6BaoNjeNLSgsuUb8v4UGVbpQ U84DD5U+TeZ9m+AUIS50iSySYojZ+QncvOKwpOf/fXhjlMKhxUDOiLVahLsOkB8aB2hkSD ZEigrq8tDjLB5JQ6InFSx1poxbb0iSsVXfwolASjL4vHZLKnFAv1ZqCjAmnXaJbxqM2FFY 48owdR/ZGeos6s2UibQ/BBw+lBfx7mLOrV580EHYoicMh0hV8K0d+bx+AcVqkZ84XZ3v+8 Enk1RDyouGC/AQLgyz01RiLnPcB524ovGnuJAvZBqXTkK3rSzj9D568SX8ce8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691901475; a=rsa-sha256; cv=none; b=ieve2oDYA79H5U6pP7qKSaS8dMxobF/pqIDRGcr0C6vVoOwmOKxSJ23LwWrwD5Wpv7IClt 1y9LyVeNnq117EDtMYtL7WKsGnIAAwXxyYnglIBIIIHhU6cwaNBm15HksoqWBEEVQcXTFw aTuGCj08OebNnZFiiRkqk/hDJl4AiYrqYf3LG/ceJJdhZ3DB/jbRkaaPwQ+4LCg2SkeV1I zAYtLdOLmX9NB8fcl0KnSc5FOZ1f3v9ZrjbRb03oTeOXA/FFt3qcyu1KGEgSmWNlpHYgMr cI1DtwVuyfNLRIDqwutLCJ4x06BqmHK6uS9tQ3zE4BHib1QgQ+LdbF4Kb7BVFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RNlBq1s9KzncB; Sun, 13 Aug 2023 04:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37D4btgI035927; Sun, 13 Aug 2023 04:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37D4btvW035924; Sun, 13 Aug 2023 04:37:55 GMT (envelope-from git) Date: Sun, 13 Aug 2023 04:37:55 GMT Message-Id: <202308130437.37D4btvW035924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4e94219d5582 - stable/13 - sys/cdefs.h: fix for use __restrict in C++ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4e94219d55824b19693287052edd8a1da76e3541 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4e94219d55824b19693287052edd8a1da76e3541 commit 4e94219d55824b19693287052edd8a1da76e3541 Author: Sebastian Huber AuthorDate: 2023-08-06 13:27:27 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-13 04:35:41 +0000 sys/cdefs.h: fix for use __restrict in C++ PR: 272723 (cherry picked from commit 15876d9fd83fdfa7d541ea747eb40faeade975d2) --- sys/sys/cdefs.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 28e464122e58..3fde24f0b9e9 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -404,17 +404,15 @@ #endif /* - * GCC 2.95 provides `__restrict' as an extension to C90 to support the - * C99-specific `restrict' type qualifier. We happen to use `__restrict' as - * a way to define the `restrict' type qualifier without disturbing older - * software that is unaware of C99 keywords. + * We use `__restrict' as a way to define the `restrict' type qualifier + * without disturbing older software that is unaware of C99 keywords. + * GCC also provides `__restrict' as an extension to support C99-style + * restricted pointers in other language modes. */ -#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95) -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 -#define __restrict -#else +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901 #define __restrict restrict -#endif +#elif !__GNUC_PREREQ__(2, 95) +#define __restrict #endif /*