From nobody Sat Jul 06 16:03:05 2024 X-Original-To: dev-commits-src-main@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 4WGZt15xy7z5Qsqf; Sat, 06 Jul 2024 16:03:05 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WGZt13TZhz4kwc; Sat, 6 Jul 2024 16:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720281785; 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=KbTAJm9qfZzyHUf8pqI2CQctfsra5kM2iWMV5YNbvP4=; b=pD7lDKBDjptkyauo4W55BorOq2OugTmHCa5YxQSx11Y1dluhpTE5QpmHNZPGrlAQOjPtCi vfVyRRfYjg5ArswgLrRbF67HKBuO8IlSoWeMI27ibpFNcMTFL9DiEmuDgVFE+/Xn220p/E z1hLZNC/6lWtWcC5qdZnbjQICMwyA0XHoh1zcdC936Zq1A8HlhoGCMdGArmOkhsT4jecrE 6vmODQVT/VjiA8HJLjGNDY8Bh3KejDMw15CBpG8fZ57e1zHic1v5rCSs7hAJazfzUvD6Zl L9jeRRtEcWNKTOcPgCSXrpTNbRddLZD7KXvIO2Odh8UmOVjNgFr+7Ktfq1TfBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720281785; a=rsa-sha256; cv=none; b=ihp8UveDaLSo8iQKWvrFoDxOAJp5qta87/FtVYyHXEEvseQvCy6jmr5u5LrX/xKVW0RFnA 4+uua4Ahaqde+ztKvJcdDxfve4z0/dMECytxUjOf8Tj/pyCZeT+563b5YCWpTGGh/VPIJ3 04vzj+IbszUpcowrfB1NOfDaVRbkHHhbljQNQgKFYiSuSgele7RIzB6KgcfFoQW2ipxHZY cbTs+XZ4wRlQp2X1PSS+o6FtKY2c2VwImxFgPPiyj6YVUYxJ4UcdeEQ8fPRtp25z/cempO bl7bj2RKu9Nqf4+D5mjzSwlaZs10cpdxTTZk5DaldogI43bEdMET91efMNfj3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720281785; 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=KbTAJm9qfZzyHUf8pqI2CQctfsra5kM2iWMV5YNbvP4=; b=ShsiJtwyiXJ5ZrAg7LvZWkaqBqc5kcO6phFRE7xLtqN8dB3fpfmZQA6jCr8ASZJekff4iG elbAArIKgatfzojf4GLz50eyb3pk8a+VH2B89duCV0B+mJrVA9hgFHtQmwKaqSL3fzweRt N7LsEBMivRZ9ZHaTqKNSFDEnA5Exiojn7d+RIFiWfj71oTCkeMjL26Np2m3ywXGuu2ET73 5hskt7Odh4sb4hIDZgViqftY8W5K4EEEhJBW/jjFCOA4DKyq3OkoZ+nS7xqvL7dOg8isXg CSQa4dCLzV9sVdBominvIsO7WHfptbEEYYlMyxJv22m7/TcH7t+We5n9tdrNMw== 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 4WGZt12Q46zmn0; Sat, 6 Jul 2024 16:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 466G35BY020211; Sat, 6 Jul 2024 16:03:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 466G359I020208; Sat, 6 Jul 2024 16:03:05 GMT (envelope-from git) Date: Sat, 6 Jul 2024 16:03:05 GMT Message-Id: <202407061603.466G359I020208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9a04df0515c9 - main - cdefs.h: Remove NO_ANSI_KEYWORDS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a04df0515c9bdc21cc26b31b0cdba14c0e12584 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a04df0515c9bdc21cc26b31b0cdba14c0e12584 commit 9a04df0515c9bdc21cc26b31b0cdba14c0e12584 Author: Warner Losh AuthorDate: 2024-07-06 16:02:35 +0000 Commit: Warner Losh CommitDate: 2024-07-06 16:02:35 +0000 cdefs.h: Remove NO_ANSI_KEYWORDS Remove very old, deletion of ANSI keywords. Once upon a time, it was common to want to do this. Then we only did it for non gcc compilers, then all compilers claimed to be gcc, so we never did it. These days, it's about useless to keep around since there's no compilers we can test it with. It's an odd little artifact. Also, the advice in the comment is wrong: if you define NO_ANSI_KEYWORDS, you can't have progams that use const, etc as identifiers because they will be deleted. Further, our header files have the 'bare' ANSI forms of these, so it's a catch 22: You'd need them deleted for .h files, but not for the code. It's such a niche case these days that it's best to just remove it. Sponsored by: Netflix Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45861 --- sys/sys/cdefs.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index e08da15e1d91..b8908138bd65 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -137,24 +137,10 @@ #define __P(protos) () /* traditional C preprocessor */ #define __CONCAT(x,y) x/**/y #define __STRING(x) "x" - #if !defined(__CC_SUPPORTS___INLINE) +/* Just delete these in a K&R environment */ #define __inline #define __volatile -/* - * In non-ANSI C environments, new programs will want ANSI-only C keywords - * deleted from the program and old programs will want them left alone. - * When using a compiler other than gcc, programs using the ANSI C keywords - * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS. - * When using "gcc -traditional", we assume that this is the intent; if - * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone. - */ -#ifndef NO_ANSI_KEYWORDS -#define const /* delete ANSI C keywords */ -#define inline -#define signed -#define volatile -#endif /* !NO_ANSI_KEYWORDS */ #endif /* !__CC_SUPPORTS___INLINE */ #endif /* !(__STDC__ || __cplusplus) */