Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2019-10-07 22:29:33 +0300
committerJeff Johnston <jjohnstn@redhat.com>2019-10-07 22:36:03 +0300
commite06f2fbde7d9d8ca3d363035dacbbc4b81e29c9a (patch)
treedf1831d7edb2fe3f0273f19faa38dfdf78584b50 /newlib/configure.host
parent175b215e054a8cee50d91317f3af22a3b2c3d320 (diff)
Allow verifying _REENT_CHECK macros memory allocation
- change sys/reent.h to replace _REENT_CHECK_DEBUG with _REENT_CHECK_VERIFY which when set asserts that any memory allocated is non-NULL and calls __assert_func directly - add new --enable-newlib-reent-check-verify configure option - add support for configure.host to specify default for newlib_reent_check_verify - add _REENT_CHECK_VERIFY macro support to acconfig.h and newlib.hin
Diffstat (limited to 'newlib/configure.host')
-rw-r--r--newlib/configure.host9
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/configure.host b/newlib/configure.host
index 87bf78a3a..fe7d9b7b5 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -29,6 +29,7 @@
# newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "")
# newlib_global_stdio_streams --enable-global-stdio-streams ("yes", "no, "")
# newlib_fno_builtin --disable-newlib-fno-builtin ("yes", "no, "")
+# newlib_reent_check_verify --enable-newlib-reent-check-verify ("yes", "no, "")
# It sets the following shell variables:
# newlib_cflags Special CFLAGS to use when building
@@ -76,6 +77,7 @@ default_newlib_io_long_double=no
default_newlib_io_pos_args=no
default_newlib_atexit_dynamic_alloc=yes
default_newlib_nano_malloc=no
+default_newlib_reent_check_verify=no
aext=a
oext=o
lpfx="lib_a-"
@@ -952,6 +954,13 @@ if [ "x${newlib_nano_malloc}" = "x" ]; then
fi
fi
+# Enable _REENT_CHECK macro memory allocation verification.
+if [ "x${newlib_reent_check_verify}" = "x" ]; then
+ if [ ${default_newlib_reent_check_verify} = "yes" ]; then
+ newlib_reent_check_verify="yes";
+ fi
+fi
+
# Remove rpc headers if xdr_dir not specified
if [ "x${xdr_dir}" = "x" ]; then
noinclude="${noinclude} rpc/types.h rpc/xdr.h"