malloc() fails to compile with --enable-newlib-reent-thread-local

"H. Peter Anvin" <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hi,

as of newlib-4.3.0 (git 9e09d6ed83cce4777a5950412647ccc603040409) 
malloc() fails to compile with the following options set:

         --disable-newlib-fseek-optimization \
         --disable-newlib-fvwrite-in-streamio \
         --disable-newlib-mb \
         --disable-newlib-reent-check-verify \
         --disable-newlib-register-fini \
         --disable-newlib-supplied-syscalls \
         --disable-newlib-unbuf-stream-opt \
         --disable-newlib-wide-orient \
         --enable-lite-exit \
         --enable-target-optspace \
         --enable-newlib-multithread \
         --enable-newlib-global-atexit \
         --enable-newlib-nano-formatted-io \
         --enable-newlib-io-c99-formats \
         --enable-newlib-reent-thread-local \
         --enable-newlib-nano-malloc

(same effect without --enable-newlib-nano-malloc).

The reason is that the malloc() routines appear to hard-code the use of 
"reent_ptr->_errno" instead of using _REENT_ERRNO(), but if I'm not 
completely out to sea it really shouldn't be using "reent_ptr" at all, 
similar to the !_LIBC case?

	-hpa
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.