[PATCH] Add missing headers to fix implicit function defns
Sebastian Huber
sebastian.huber@embedded-brains.de
Tue Jan 17 10:08:00 GMT 2017
On 16/01/17 22:21, Hans-Bernhard Bröker 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.
No, this would lead to cyclic dependencies (<stdlib.h> includes
<sys/reent.h>) and would make <string.h> and <stdlib.h> unnecessarily
visible via unrelated standard header files.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the Newlib
mailing list