Re: [hackers] [sbase] [PATCH 04/10] Don't use buffered IO (fread) when not appropriate

From: Silvan Jegen <>
Date: Tue, 6 Dec 2016 13:11:38 +0100

Hi Laslo

On Tue, Dec 6, 2016 at 12:51 PM, Laslo Hunhold <> wrote:
> On Tue, 6 Dec 2016 10:26:22 +0100
> Silvan Jegen <> wrote:
>> It only compiled for me because "util.h" includes stdio.h so the
>> definitions are included already. We can still remove this include if
>> we don't want it to be included twice but I don't know which approach
>> is preferred here.
> we definitely need to include it here as your implementation does not
> represent everyone's implementation. If Posix demands to include
> something for a given function, we should include it.

What I meant is that cksum.c includes <stdio.h> transitively (because
cksum.c includes "util.h" which includes <stdio.h>). As far as I know,
the setup of my development environment should not matter in that case
and the code should compile on any C compiler (with a preprocessor)
without having to include <stdio.h> in cksum.c again.

Including <stdio.h> directly in cksum.c makes the dependency more
explicit though and even if this results in the code of the header
being included again (as I think it will), I doubt it will have a big
impact on compilation speed.


Received on Tue Dec 06 2016 - 13:11:38 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 06 2016 - 13:12:17 CET