History log of /netbsd-src/usr.bin/make/make_malloc.h (Results 1 – 18 of 18)
Revision Date Author Comments
# c8c1f268 15-Dec-2021 rillig <rillig@NetBSD.org>

make: remove bmake_free

It was only used in 2 places, and in both these places, the pointer was
never null.


# 7371a30a 15-Dec-2021 rillig <rillig@NetBSD.org>

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.


# 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 ...


# b754dcb0 30-Dec-2020 rillig <rillig@NetBSD.org>

make(1): format multi-line comments


# 4743be9a 15-Dec-2020 rillig <rillig@NetBSD.org>

make(1): indent hash.h and make_malloc.h with tabs instead of spaces


# a40fe9f7 10-Nov-2020 rillig <rillig@NetBSD.org>

make(1): use consistent definition for MAKE_INLINE


# 82889935 19-Oct-2020 rillig <rillig@NetBSD.org>

make(1): clean up headers, no functional change


# de337db5 13-Sep-2020 rillig <rillig@NetBSD.org>

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
w

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.

show more ...


# 64e0a331 29-Aug-2020 rillig <rillig@NetBSD.org>

make(1): fix build with -DUSE_EMALLOC


# 23181bcc 29-Aug-2020 rillig <rillig@NetBSD.org>

make(1): add bmake_strsedup for duplicating a substring


# a3c983f2 25-Aug-2020 rillig <rillig@NetBSD.org>

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

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.

show more ...


# 0cbd5c0e 20-Aug-2020 rillig <rillig@NetBSD.org>

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
rena

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.

show more ...


# bdd56552 01-Aug-2020 rillig <rillig@NetBSD.org>

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.


# ad6695e0 01-Aug-2020 rillig <rillig@NetBSD.org>

make(1): avoid calls to free(3) in the common case of a NULL pointer


# 97347d2c 24-Jan-2009 dsl <dsl@NetBSD.org>

Fixes to includes of make_malloc.h to that it actually builds when
USE_EMALLOC is undefined.
Fixes earlier fixes :-)


# 9fde1a67 24-Jan-2009 cegger <cegger@NetBSD.org>

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


# e6227c55 24-Jan-2009 cegger <cegger@NetBSD.org>

buildfix: remove RCSID. It conflicts with the definition in the .c files.


# 4fb693c1 24-Jan-2009 dsl <dsl@NetBSD.org>

Move the bmake_malloc() functions into their own .c and .h files.
Include instead of make.h in a few places.