Severin Teona - SAOC Milestone 3 Updates 2 & 3 - Druntime for Microcontrollers

IGotD- nise at nise.com
Fri Dec 11 14:33:17 UTC 2020


On Friday, 11 December 2020 at 12:51:53 UTC, Severin Teona wrote:
>
> Not exactly. I used a struct __sFile_fake for each one of 
> stdin/out/err, like in newlib/libc/include/sys/reent.h.
>
> I did this after I compiled a simple C application with the -E 
> flag (only preprocessing) and I saw that stdin/out/err were 
> translated to _impure_ptr->_stdin/out/err. I searched for these 
> symbols in newlib and I found them in reent.h.
>
> I don't know how accurate and right is it, but it seems to link 
> the application ok.

However, __getreent is more future proof because we don't know if 
the Newlib code will change the name of the globals in the future 
as that is internal code. __getreent is a feature of Newlib that 
will not go away.


More information about the Digitalmars-d mailing list