Source-Changes archive

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

CVS commit: src/usr.bin/make



Module Name:    src
Committed By:   rillig
Date:           Fri Feb  4 23:22:19 UTC 2022

Modified Files:
        src/usr.bin/make: dir.c for.c job.c make.h meta.c parse.c

Log Message:
make: use unsigned int for line numbers everywhere

Previously, some line numbers were stored as signed int while others
were stored as size_t.  Since line numbers are never negative, use an
unsigned type.  Since the maximum file size for makefiles is 1 GB (see
loadfile), unsigned int is large enough even on 64-bit platforms.

Using a single data types reduces the number of type conversions.  Using
unsigned int improves compatibility with C90 (printf %u instead of %zu),
which is needed by bmake, which is derived from usr.bin/make.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/usr.bin/make/dir.c
cvs rdiff -u -r1.166 -r1.167 src/usr.bin/make/for.c
cvs rdiff -u -r1.450 -r1.451 src/usr.bin/make/job.c
cvs rdiff -u -r1.296 -r1.297 src/usr.bin/make/make.h
cvs rdiff -u -r1.195 -r1.196 src/usr.bin/make/meta.c
cvs rdiff -u -r1.660 -r1.661 src/usr.bin/make/parse.c

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