On Mon, Jun 10, 2019 at 5:27 PM Junio C Hamano <gits...@pobox.com> wrote:
> Eric Sunshine <sunsh...@sunshineco.com> writes:
> >> +#include <stdio.h>
> >> +#include "builtin.h"
> >
> > Git source files must always include cache.h or git-compat-util.h (or,
> > for builtins, builtin.h) as the very first header since those headers
> > take care of differences which might crop up as problems with system
> > headers on various platforms. System headers are included after Git
> > headers. So, stdio.h should be included after builtin.h. In this case,
>
> Actually the idea is that platform agnostic part of the codebase
> should not have to include _any_ system header themselves; instead,
> including git-compat-util.h should take care of the system header
> files *including* the funky ordering requirements some platforms may
> have.  So, we'd want to go stronger than "should be included after";
> it shouldn't have to be included or our git-compat-util.h is wrong.

Thanks for clarifying that.

Reply via email to