Commit 0fb4b351 by Patrick Steinhardt

Fix missing include for header files

Some of our header files are not included at all by any of their
implementing counter-parts. Including them inside of these files leads
to some compile errors mostly due to unknown types because of missing
includes. But there's also one case where a declared function does not
match the implementation's prototype.

Fix all these errors by fixing up the prototype and adding missing
includes. This is preparatory work for fixing up missing includes in the
implementation files.
parent 9b0482e4
......@@ -7,6 +7,8 @@
#ifndef INCLUDE_clone_h__
#define INCLUDE_clone_h__
#include "git2/clone.h"
extern int git_clone__should_clone_local(const char *url, git_clone_local_t local);
#endif
......@@ -7,6 +7,10 @@
#ifndef INCLUDE_diff_generate_h__
#define INCLUDE_diff_generate_h__
#include "diff.h"
#include "pool.h"
#include "index.h"
enum {
GIT_DIFFCAPS_HAS_SYMLINKS = (1 << 0), /* symlinks on platform? */
GIT_DIFFCAPS_IGNORE_STAT = (1 << 1), /* use stat? */
......
......@@ -7,6 +7,8 @@
#ifndef INCLUDE_diff_tform_h__
#define INCLUDE_diff_tform_h__
#include "diff_file.h"
extern int git_diff_find_similar__hashsig_for_file(
void **out, const git_diff_file *f, const char *path, void *p);
......
......@@ -7,6 +7,8 @@
#ifndef INCLUDE_fetch_h__
#define INCLUDE_fetch_h__
#include "git2/remote.h"
#include "netops.h"
int git_fetch_negotiate(git_remote *remote, const git_fetch_options *opts);
......
......@@ -7,6 +7,7 @@
#ifndef INCLUDE_fetchhead_h__
#define INCLUDE_fetchhead_h__
#include "oid.h"
#include "vector.h"
typedef struct git_fetchhead_ref {
......
......@@ -7,6 +7,8 @@
#ifndef INCLUDE_indexer_h__
#define INCLUDE_indexer_h__
extern int git_indexer__set_fsync(git_indexer *idx, int do_fsync);
#include "git2/indexer.h"
extern void git_indexer__set_fsync(git_indexer *idx, int do_fsync);
#endif
......@@ -7,6 +7,8 @@
#ifndef INCLUDE_patch_parse_h__
#define INCLUDE_patch_parse_h__
#include "patch.h"
typedef struct {
git_refcount rc;
......
......@@ -7,6 +7,8 @@
#ifndef INCLUDE_refdb_fs_h__
#define INCLUDE_refdb_fs_h__
#include "strmap.h"
typedef struct {
git_strmap *packfile;
time_t packfile_time;
......
......@@ -9,6 +9,7 @@
#include "git2/buffer.h"
#include "buffer.h"
#include "thread-utils.h"
#include "common.h"
#include "strnlen.h"
......@@ -286,8 +287,6 @@ extern int git__strncasecmp(const char *a, const char *b, size_t sz);
extern int git__strcasesort_cmp(const char *a, const char *b);
#include "thread-utils.h"
typedef struct {
git_atomic refcount;
void *owner;
......
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