Source-Changes archive

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

CVS commit: src/bin/sh



Module Name:    src
Committed By:   kre
Date:           Thu Aug 16 15:02:05 UTC 2018

Modified Files:
        src/bin/sh: mknodenames.sh

Log Message:
NFC - a build structure code layout change only.

This generates nodenames.h which is a file that used to begin
        #ifdef DEBUG
(line 1) and end with
        #endif
(last line) with no intervening (matching) #else ... ie: for DEBUG use only.

That led to situations where non-debug code would like to make use
of the info provided, if DEBUG was enabled, needed to add #ifdef DEBUG
at the point of use.

Avoid that by providing new macros that are always defined (DEBUG or not,
so now we have a #else) which allow code to be written to make use of
the extra DEBUG info, if it is available, or not, if not.

While here, add double-include protection on the generated .h file
(just being cautious - nothing is ever going to cause it to get
included anywhere twice - or it shouldn't) and add the traditional
comments on the #else and #endif stuff (which is also really useless
as no-one is really expected to ever read the generated file).  Never mind.

Nothing yet (elsewhere in the sh source) uses the new macros, so there's
even less chance of this changing anything than there would otherwise be.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/bin/sh/mknodenames.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index