Module Name: src Committed By: rillig Date: Thu Feb 3 20:32:38 UTC 2022
Modified Files: src/doc: CHANGES src/tools: README Log Message: tools: allow tools to use C99 The previous requirement was that tools should only use C89 features. Several tools did not follow this rule for years. Since nobody complained about not being able to build NetBSD in a C89 environment, drop that rule, now requiring C99. https://mail-index.netbsd.org/tech-toolchain/2022/01/30/msg004091.html To generate a diff of this commit: cvs rdiff -u -r1.2858 -r1.2859 src/doc/CHANGES cvs rdiff -u -r1.4 -r1.5 src/tools/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2858 src/doc/CHANGES:1.2859 --- src/doc/CHANGES:1.2858 Sun Jan 23 16:48:37 2022 +++ src/doc/CHANGES Thu Feb 3 20:32:38 2022 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2858 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2859 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -468,3 +468,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: sysinst(8): Allow configuring IEEE 802.11 / Wi-Fi devices with WPA or open networks. [nia 20220111] tmux(1): Imported 3.2a. [christos 20220123] + tools: Allow tools to use C99. [rillig 20220203] Index: src/tools/README diff -u src/tools/README:1.4 src/tools/README:1.5 --- src/tools/README:1.4 Sat Jan 3 13:20:11 2015 +++ src/tools/README Thu Feb 3 20:32:38 2022 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.4 2015/01/03 13:20:11 apb Exp $ +$NetBSD: README,v 1.5 2022/02/03 20:32:38 rillig Exp $ Notes for NetBSD src/tools @@ -29,19 +29,14 @@ Programs that are built as tools need to parts of NetBSD, because they will need to run on the host platform. Most tools should restrict themselves to C language features that are -defined in C89 (ISO 9899-1989); they should avoid using C99 language -features. There are a few tools, such as compilers, where it is not -practical for the C89 restriction to be maintained. There are also a -few features, such as the long long data type, that are used by many -tools despite not being defined in C89. - -Tools may use library features such as functions, macros, and -types, that are defined in C89 and in POSIX (IEEE Std 1003.1) (XXX -year?), and features that are provided by the compatibility framework -(src/tools/compat) described in a separate section below. This is -usually not an onerous burden, because many C99 library features, and -NetBSD-specific features, are already provided by src/tools/compat, or -can be added when the need for them becomes apparent. +defined in C99 (ISO/IEC 9899-1999); they should avoid using C11 language +features, such as <threads.h>, _Alignof, <uchar.h>, _Generic, +static_assert, anonymous structures and unions. + +Tools may use library features such as functions, macros, and types, +that are defined in C99 and in POSIX (IEEE Std 1003.1) (XXX year?), and +features that are provided by the compatibility framework +(src/tools/compat) described in a separate section below. If a tool attempts to use a feature that is not available on the host platform, then the tools build will fail. This can be addressed by