| #
3c2f2cbb |
| 28-Mar-2023 |
rillig <rillig@NetBSD.org> |
make: declare all common symbols in headers, unexport others
No functional change.
|
| #
302298bf |
| 26-Mar-2022 |
rillig <rillig@NetBSD.org> |
make: prefer 'long long' over 'long' on 32-bit C99 platforms
When sorting the words of an expression numerically using the modifier ':On' (added on 2021-07-30), use 64-bit numbers even on 32-bit pla
make: prefer 'long long' over 'long' on 32-bit C99 platforms
When sorting the words of an expression numerically using the modifier ':On' (added on 2021-07-30), use 64-bit numbers even on 32-bit platforms. A typical use case is comparing file sizes.
When tracing the execution of jobs, fix an integer overflow after 2038. 32-bit platforms that use a pre-C99 compiler still have this problem.
No change to the test suite since most tests simply skip any potential differences between 32-bit platforms and 64-bit platforms (see varmod-order-numeric.mk) or already account for both variants (see varmod-localtime.mk).
show more ...
|
| #
a28470e2 |
| 05-Feb-2022 |
rillig <rillig@NetBSD.org> |
make: improve C90 support
Do not use inline functions, remove trailing comma in enum declaration, do not use 'long long' for printing a timestamp. This re-introduces the Year 2038 Problem for pre-C
make: improve C90 support
Do not use inline functions, remove trailing comma in enum declaration, do not use 'long long' for printing a timestamp. This re-introduces the Year 2038 Problem for pre-C99 compilers when printing the trace log, but that is a seldom used feature.
show more ...
|
| #
a8e14f36 |
| 15-Dec-2021 |
rillig <rillig@NetBSD.org> |
make: format comments according to /usr/share/misc/style
Assisted by indent(1), with manual corrections due to its many remaining bugs.
No functional change.
|
| #
ad3f6413 |
| 21-Sep-2021 |
rillig <rillig@NetBSD.org> |
make: reduce relocations, thereby reducing .text size
No functional change.
|
| #
835b4db4 |
| 05-Feb-2021 |
rillig <rillig@NetBSD.org> |
make: in the Var_ functions, move the scope to the front
This change provides for a more natural reading order in the code. Placing the scope first makes it immediately clear in which context the re
make: in the Var_ functions, move the scope to the front
This change provides for a more natural reading order in the code. Placing the scope first makes it immediately clear in which context the remaining parameters are interpreted.
No functional change.
show more ...
|
| #
5980c2c3 |
| 04-Feb-2021 |
rillig <rillig@NetBSD.org> |
make: rename some VAR constants to SCOPE
The word "context" does not fit perfectly to the variables that are associate with a GNode, as the context is usually something from the outside and the vari
make: rename some VAR constants to SCOPE
The word "context" does not fit perfectly to the variables that are associate with a GNode, as the context is usually something from the outside and the variables are more like properties inherent to the GNode.
The term "global context" fits even less. Since the thing where variables are looked up is commonly named a scope, use that term instead.
This commit only renames the global variables VAR_GLOBAL, VAR_INTERNAL and VAR_CMDLINE, plus a few very closely related comments. These are:
GNode.vars (because of line breaks) GNode_Free (dito) varname-make_print_var_on_error.mk varname-make_print_var_on_error-jobs.mk
The debug message in Var_Stats is left as-is since there is no unit test for it yet.
The other renamings (variable names "context", "ctxt", as well as further comments) will be done in a follow-up commit.
show more ...
|
| #
85aee7a6 |
| 19-Jan-2021 |
rillig <rillig@NetBSD.org> |
make(1): remove do-not-format markers from comments
These markers had been used inconsistently. Furthermore the source code had not been formatted automatically before 2020 at all, otherwise there
make(1): remove do-not-format markers from comments
These markers had been used inconsistently. Furthermore the source code had not been formatted automatically before 2020 at all, otherwise there wouldn't have been any trailing whitespace left.
show more ...
|
| #
03074130 |
| 20-Dec-2020 |
rillig <rillig@NetBSD.org> |
make(1): change return type of Var_Value to FStr
|
| #
e0fa644c |
| 12-Dec-2020 |
rillig <rillig@NetBSD.org> |
make(1): move Job.xtraced to ShellWriter
This flag was placed wrong in the Job since it is only necessary as long as the shell commands are written to the shell file.
Resetting it in JobStart and J
make(1): move Job.xtraced to ShellWriter
This flag was placed wrong in the Job since it is only necessary as long as the shell commands are written to the shell file.
Resetting it in JobStart and JobExec was completely misguided since that is far away from writing the shell commands; this should have been done in JobPrintCommands instead.
The status of this flag doesn't need to be printed in debugging mode since it is controlled by a single command line option (-dx) and does not interact with all the other switches.
show more ...
|
| #
a6d2ec59 |
| 10-Dec-2020 |
rillig <rillig@NetBSD.org> |
make(1): unpack struct JobFlags
The job flags are only used individually.
|
| #
c2147f48 |
| 10-Dec-2020 |
rillig <rillig@NetBSD.org> |
make(1): split JobFlags into separate fields
Having all these flags in a single bitmask makes it harder to see where exactly they can possibly be used since their state could also be modified using
make(1): split JobFlags into separate fields
Having all these flags in a single bitmask makes it harder to see where exactly they can possibly be used since their state could also be modified using the unsuspicious job->flags = 0. Using individual names just leaves the single memset, and that is only used during initialization.
show more ...
|
| #
625b0ad5 |
| 31-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): document possible undefined behavior in trace.c with .CURDIR
|
| #
e8b104bf |
| 30-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): change char * to void * in Var_Value
The only purpose of the parameter freeIt is to free the memory associated with the return value. To do this, no pointer arithmetic is needed. Therefor
make(1): change char * to void * in Var_Value
The only purpose of the parameter freeIt is to free the memory associated with the return value. To do this, no pointer arithmetic is needed. Therefore, change to a void pointer, to catch accidental use of that pointer.
show more ...
|
| #
f336e55b |
| 05-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): revert previous commit
It had accidentally reverted all the work from the past few days.
|
| #
b6c0384f |
| 05-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)
The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In that commit, openDirectories was replaced with a combinatio
make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)
The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25. In that commit, openDirectories was replaced with a combination of a list with a hash table, for more efficient lookup by name.
Upon cleanup, OpenDirs_Done is called, which in turn called Dir_ClearPath. Dir_ClearPath takes full ownership of the given list and empties it. This was no problem before since afterwards the list was empty and calling Lst_Free just frees the remaining list pointer.
With OpenDirs, this list was combined with a hash table, and the hash table contains the list nodes, assuming that the OpenDirs functions have full ownership of both the list and the hash table. This assumption was generally correct, except for the one moment during cleanup where full ownership of the list was passed to Dir_ClearPath, while the hash table still contained pointers to the (now freed) list nodes. This by itself was not a problem since the hash table would be freed afterwards. But as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up the freed directory by name and now found the freed list node, trying to free it again. Boom.
Fixed by replacing the call to Dir_ClearPath with code that only frees the directories, without giving up control over the list.
show more ...
|
| #
052e64b5 |
| 03-Oct-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up #include sections
|
| #
6de75a95 |
| 13-Sep-2020 |
rillig <rillig@NetBSD.org> |
make(1): clean up RCSID blocks
These blocks mostly consisted of redundant structure, following the same #ifndef pattern over and over, with only minimal variation.
It's easier to maintain if the co
make(1): clean up RCSID blocks
These blocks mostly consisted of redundant structure, following the same #ifndef pattern over and over, with only minimal variation.
It's easier to maintain if the common structure is only written once and encapsulated in a macro.
To avoid "defined but unused" warnings from GCC in the case where MAKE_NATIVE is not defined, I had to add volatile. Adding MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the resulting binary.
show more ...
|
| #
86abf69e |
| 03-Aug-2020 |
rillig <rillig@NetBSD.org> |
make(1): no declaration-after-statement anymore
NetBSD make is intended to be maximally portable, therefore it uses only C89. This was not declared in the Makefile before.
There are still a few pl
make(1): no declaration-after-statement anymore
NetBSD make is intended to be maximally portable, therefore it uses only C89. This was not declared in the Makefile before.
There are still a few places in parse.c and metachar.c that use end-of-line comments. These will be fixed in a follow-up commit.
show more ...
|
| #
ad6695e0 |
| 01-Aug-2020 |
rillig <rillig@NetBSD.org> |
make(1): avoid calls to free(3) in the common case of a NULL pointer
|
| #
ab2bfed6 |
| 01-Aug-2020 |
rillig <rillig@NetBSD.org> |
make(1): let Var_Value return a const char *
The return value must not be modified anyway, so let the compiler check this for free.
|
| #
820b5cae |
| 03-Jul-2020 |
rillig <rillig@NetBSD.org> |
make(1): remove trailing whitespace
|
| #
266b18d8 |
| 28-Dec-2008 |
christos <christos@NetBSD.org> |
prepare for time_t 64
|
| #
ce099b40 |
| 28-Apr-2008 |
martin <martin@NetBSD.org> |
Remove clause 3 and 4 from TNF licenses
|
| #
a686e4e7 |
| 15-Feb-2008 |
christos <christos@NetBSD.org> |
back all changes out until I fix it properly.
|