[PATCH] Add missing headers to fix implicit function defns

Pat Pannuto pat.pannuto@gmail.com
Mon Jan 16 21:26:00 GMT 2017


Quite possibly. This warning at the top of <sys/reent.h> made me nervous as I
don't have a handle on exactly what reent.h is doing and how it plays with other
headers:

/* WARNING: All identifiers here must begin with an underscore.  This file is
   included by stdio.h and others and we therefore must only use identifiers
   in the namespace allotted to us.  */

So I went with the more conservative change. If you have a deeper understanding
and including other std* headers in reent.h is safe, then I agree it's
probably a
better fix.

On Mon, Jan 16, 2017 at 4:21 PM, Hans-Bernhard Bröker
<HBBroeker@t-online.de> wrote:
> Am 16.01.2017 um 01:12 schrieb Pat Pannuto:
>>
>> A few files were missing headers for memset/malloc, likely missed
>> because the files don't directly call the functions, rather they
>> come in via macros in libc/include/sys/reent.h:
>
>
> Shouldn't then <sys/reent.h> be including <string.h> and <stdlib.h> itself,
> to be done with it?
>
> If a header defines macros which reference things provided by other headers,
> it should make sure those other things are known, i.e. it should include
> those other headers.
>



More information about the Newlib mailing list