From 2faeaf50fd3e83a8573d6008f3e927c1d40c3b4a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 13 May 2022 13:44:13 +0200 Subject: Use global atexit data for all configurations For the exit processing only members of _GLOBAL_REENT were used by default. If the _REENT_GLOBAL_ATEXIT option was enabled, then the data structures were provided through dedicated global objects. Make this option the default. Remove the option. Rename struct _reent members _atexit and _atexit0 to _reserved_6 and _reserved_7, respectively. Provide them only if _REENT_BACKWARD_BINARY_COMPAT is defined. --- newlib/configure.ac | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'newlib/configure.ac') diff --git a/newlib/configure.ac b/newlib/configure.ac index 12d52c262..57f830960 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -142,16 +142,16 @@ AC_ARG_ENABLE(newlib-atexit-dynamic-alloc, dnl Support --enable-newlib-global-atexit dnl Enable atexit data structure as global variables to save memory usage in -dnl _reent. +dnl _reent. This is no longer optional. It is enabled in all Newlib +dnl configurations. AC_ARG_ENABLE(newlib-global-atexit, [ --enable-newlib-global-atexit enable atexit data structure as global], [if test "${newlib_global_atexit+set}" != set; then case "${enableval}" in yes) newlib_global_atexit=yes ;; - no) newlib_global_atexit=no ;; *) AC_MSG_ERROR(bad value ${enableval} for newlib-global-atexit option) ;; esac - fi], [newlib_global_atexit=no])dnl + fi], [newlib_global_atexit=yes])dnl dnl Support --enable-newlib-reent-small AC_ARG_ENABLE(newlib-reent-small, @@ -470,10 +470,6 @@ if test "${newlib_atexit_dynamic_alloc}" = "yes"; then AC_DEFINE(_ATEXIT_DYNAMIC_ALLOC, 1, [If atexit() may dynamically allocate space for cleanup functions.]) fi -if test "${newlib_global_atexit}" = "yes"; then - AC_DEFINE(_REENT_GLOBAL_ATEXIT, 1, [Define if declare atexit data as global.]) -fi - if test "${newlib_fvwrite_in_streamio}" = "yes"; then AC_DEFINE(_FVWRITE_IN_STREAMIO, 1, [Define if ivo supported in streamio.]) fi -- cgit v1.2.3