Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools Update documentation about tools being restricted to C...



details:   https://anonhg.NetBSD.org/src/rev/c65cdc25a4dc
branches:  trunk
changeset: 335328:c65cdc25a4dc
user:      apb <apb%NetBSD.org@localhost>
date:      Sat Jan 03 13:20:11 2015 +0000

description:
Update documentation about tools being restricted to C89 (or not).

It's not practical for the C89 restriction to be maintained for
compilers, but it is still desirable for most tools.  The "long long"
data type is in wide use despite not being in C89.  C99 library features
(as opposed to language features) can often be added to the compat
framework when the need becomes apparent.

diffstat:

 tools/README |  21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r 9c0cc81d4543 -r c65cdc25a4dc tools/README
--- a/tools/README      Sat Jan 03 13:16:41 2015 +0000
+++ b/tools/README      Sat Jan 03 13:20:11 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.3 2014/09/30 07:34:50 apb Exp $
+$NetBSD: README,v 1.4 2015/01/03 13:20:11 apb Exp $
 
 Notes for NetBSD src/tools
 
@@ -28,12 +28,20 @@
 Programs that are built as tools need to be more portable than other
 parts of NetBSD, because they will need to run on the host platform.
 
-Tools should restrict themselves to C language features that are defined
-in C89 (ISO 9899-1989); they should avoid using C99 features.
+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 library features defined in C89 and in POSIX (IEEE Std 1003.1)
-(XXX year?), and features that are provided by the src/tools/compat
-framework described below.
+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.
 
 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
@@ -137,4 +145,3 @@
        ... code to be used when FEATURE X is not desired,
        ... e.g. when being built as a tool.
     #endif
-



Home | Main Index | Thread Index | Old Index