bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] FYI: copy-file.c tweak


From: Bruno Haible
Subject: Re: [Bug-gnulib] FYI: copy-file.c tweak
Date: Fri, 25 Apr 2003 13:23:08 +0200 (CEST)

Jim Meyering writes:
> But copy-file.c already includes <stddef.h> via
> safe-read.h (which has the prototype for safe_read).

It follows the general rule: If foobar.c needs a certain include file
but foobar.h doesn't already include it, then let foobar.c include it.
This rule enables modular development: If someone modifies safe-read.h
in the future, to remove <stddef.h> from there, he will update all the
callers of the functions safe_read() if needed, but he will usually
not add <stddef.h> to all .c files that #include "safe-read.h".

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]