This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Add missing headers to fix implicit function defns
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Hans-Bernhard Bröker <HBBroeker at t-online dot de>, Pat Pannuto <pat dot pannuto at gmail dot com>, newlib at sourceware dot org
- Date: Tue, 17 Jan 2017 11:08:00 +0100
- Subject: Re: [PATCH] Add missing headers to fix implicit function defns
- Authentication-results: sourceware.org; auth=none
- References: <20170116001202.92837-1-pat.pannuto@gmail.com> <77913c3d-d17f-8b91-4bd9-e2a9bdef2e0b@t-online.de>
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.