Commit 9b0482e4 by Patrick Steinhardt

zlib: include "git2/types.h" instead of "common.h"

The zlib dependency includes "common.h" inside of the "zconf.h" header
to make available some type declarations like e.g. git_off_t. Including
the "common.h" header does pull in quite a lot of other headers though,
which are not required at all. Instead, we can just include our public
"git2/types.h" header, which is much more limited in its scope but still
provides everything required for "zconf.h".

This fix eases the transition later on to use a separate "features.h"
header instead of defines. As we have to generate the "features.h"
header, we put it in the build directory and add an include directory.
As we are splitting out building of dependencies into subdirectories,
this would mean that the zlib dependency needs to be aware of the parent
project's build directory, which is unfortunate. By including
"git2/types.h", we avoid this problem.
parent 459fb8fe
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
#ifndef ZCONF_H #ifndef ZCONF_H
#define ZCONF_H #define ZCONF_H
#include "../../src/common.h" #include "../../include/git2/types.h"
#include <stdarg.h>
/* Jeez, don't complain about non-prototype /* Jeez, don't complain about non-prototype
* forms, we didn't write zlib */ * forms, we didn't write zlib */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment