History log of /src/usr.bin/make/make_malloc.h |
Revision | | Date | Author | Comments |
1.18 |
| 15-Dec-2021 |
rillig | make: remove bmake_free
It was only used in 2 places, and in both these places, the pointer was never null.
|
1.17 |
| 15-Dec-2021 |
rillig | make: mark several functions whose result must be used
Suggested by sjg, to catch more bugs like the memory leak in cond.c 1.303 from 2021-12-13.
No binary change.
|
1.16 |
| 19-Jan-2021 |
rillig | 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.
|
1.15 |
| 30-Dec-2020 |
rillig | make(1): format multi-line comments
|
1.14 |
| 15-Dec-2020 |
rillig | make(1): indent hash.h and make_malloc.h with tabs instead of spaces
|
1.13 |
| 10-Nov-2020 |
rillig | make(1): use consistent definition for MAKE_INLINE
|
1.12 |
| 19-Oct-2020 |
rillig | make(1): clean up headers, no functional change
|
1.11 |
| 13-Sep-2020 |
rillig | make(1): fix position of MAKE_ATTR_UNUSED in inline functions
The attribute needs to be before the return type, otherwise GCC 5 complains that Hash_GetValue is defined but not used, when compiling with USER_CPPFLAGS=-Dinline=. The other functions don't get any warnings. It's probably because Hash_GetValue is the only inline function that returns a pointer.
|
1.10 |
| 29-Aug-2020 |
rillig | make(1): fix build with -DUSE_EMALLOC
|
1.9 |
| 29-Aug-2020 |
rillig | make(1): add bmake_strsedup for duplicating a substring
|
1.8 |
| 25-Aug-2020 |
rillig | make(1): allow make to be compiled in C90 mode
Since the inline functions are the only C99 feature used by now, setting USER_CFLAGS='-std=c90 -ansi -Dinline=' is enough for compiling make with a C90 compiler.
|
1.7 |
| 20-Aug-2020 |
rillig | make(1): remove unreached code from bmake_strndup
The "at most" branch was never taken since all call sites in var.c only ever need a substring, and the target buffer is not limited. Therefore rename the function and make it simpler.
It's ok that bmake_strldup is defined as estrndup in case of USE_EMALLOC since that function's implementation is compatible to the "copy exactly", it just contains some extra null checks that will never match since the variable values cannot (well, or should not) contain null bytes. Theoretically they can, but the behavior then depends on the exact implementation and is unreliable, therefore nobody does this. After all, Makefiles are used for text processing, not for binary data.
|
1.6 |
| 01-Aug-2020 |
rillig | make(1): use consistent indentation in source code
Tabs for multiples of 8, then spaces.
The usage string has been kept as-is since the spaces there are indentional and do influence the output.
|
1.5 |
| 01-Aug-2020 |
rillig | make(1): avoid calls to free(3) in the common case of a NULL pointer
|
1.4 |
| 24-Jan-2009 |
dsl | Fixes to includes of make_malloc.h to that it actually builds when USE_EMALLOC is undefined. Fixes earlier fixes :-)
|
1.3 |
| 24-Jan-2009 |
cegger | buildfixes for OSX: - include <sys/types> for size_t - progname is undeclared - include <string.h> for string functions like strlen() - include <errno.h> for errno
|
1.2 |
| 24-Jan-2009 |
cegger | buildfix: remove RCSID. It conflicts with the definition in the .c files.
|
1.1 |
| 24-Jan-2009 |
dsl | Move the bmake_malloc() functions into their own .c and .h files. Include instead of make.h in a few places.
|