On 08/14/2013 07:04 PM, Junio C Hamano wrote: > Stefan Beller <stefanbel...@googlemail.com> writes: > >> diff --git a/builtin/repack.c b/builtin/repack.c >> new file mode 100644 >> index 0000000..d39c34e >> --- /dev/null >> +++ b/builtin/repack.c >> @@ -0,0 +1,410 @@ >> +/* >> + * The shell version was written by Linus Torvalds (2005) and many others. >> + * This is a translation into C by Stefan Beller (2013) >> + */ >> + >> +#include "builtin.h" >> +#include "cache.h" >> +#include "dir.h" >> +#include "parse-options.h" >> +#include "run-command.h" >> +#include "sigchain.h" >> +#include "strbuf.h" >> +#include "string-list.h" >> + >> +#include <sys/types.h> >> +#include <unistd.h> >> +#include <stdio.h> >> +#include <dirent.h> > > If you need these system-includes here, it means that our own > platform-portability layer "git-compat-util.h" is broken. On > various systems, often some system header files are missing, need a > few feature macros to be defined before including, and/or need to be > included in certain order, etc., and "git-compat-util.h" is meant to > hide all such details from the programmers. > > I do not think the above four needs to be included in *.c, as long > as you include either builtin.h or cache.h, both of which includes > the compat-util header. >
Thanks. It works without these includes as well. I think I got those includes before I realized there is so much infrastructure already available and I forgot to remove these includes once I added the others.
Description: OpenPGP digital signature