Git fork

treewide: remove double forward declaration of read_in_full

cache.h's nature of a dumping ground of includes prevented it from
being included in some compat/ files, forcing us into a workaround
of having a double forward declaration of the read_in_full() function
(see commit 14086b0a13 ("compat/pread.c: Add a forward declaration to
fix a warning", 2007-11-17)). Now that we have moved functions like
read_in_full() from cache.h to wrapper.h, and wrapper.h isn't littered
with unrelated and scary #defines, get rid of the extra forward
declaration and just have compat/pread.c include wrapper.h.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Elijah Newren and committed by
Junio C Hamano
65156bb7 31dfa17b

+11 -6
+1
builtin/clone.c
··· 42 42 #include "hook.h" 43 43 #include "bundle.h" 44 44 #include "bundle-uri.h" 45 + #include "wrapper.h" 45 46 46 47 /* 47 48 * Overall FIXMEs:
+1
bulk-checkin.c
··· 17 17 #include "packfile.h" 18 18 #include "object-file.h" 19 19 #include "object-store.h" 20 + #include "wrapper.h" 20 21 21 22 static int odb_transaction_nesting; 22 23
+1
combine-diff.c
··· 16 16 #include "userdiff.h" 17 17 #include "oid-array.h" 18 18 #include "revision.h" 19 + #include "wrapper.h" 19 20 20 21 static int compare_paths(const struct combine_diff_path *one, 21 22 const struct diff_filespec *two)
+1
compat/pread.c
··· 1 1 #include "../git-compat-util.h" 2 + #include "../wrapper.h" 2 3 3 4 ssize_t git_pread(int fd, void *buf, size_t count, off_t offset) 4 5 {
-6
git-compat-util.h
··· 859 859 #define pread git_pread 860 860 ssize_t git_pread(int fd, void *buf, size_t count, off_t offset); 861 861 #endif 862 - /* 863 - * Forward decl that will remind us if its twin in cache.h changes. 864 - * This function is used in compat/pread.c. But we can't include 865 - * cache.h there. 866 - */ 867 - ssize_t read_in_full(int fd, void *buf, size_t count); 868 862 869 863 #ifdef NO_SETENV 870 864 #define setenv gitsetenv
+1
grep.c
··· 11 11 #include "commit.h" 12 12 #include "quote.h" 13 13 #include "help.h" 14 + #include "wrapper.h" 14 15 15 16 static int grep_source_load(struct grep_source *gs); 16 17 static int grep_source_is_binary(struct grep_source *gs,
+1
pack-write.c
··· 10 10 #include "oidmap.h" 11 11 #include "pack-objects.h" 12 12 #include "pack-revindex.h" 13 + #include "wrapper.h" 13 14 14 15 void reset_pack_idx_option(struct pack_idx_option *opts) 15 16 {
+1
path.c
··· 18 18 #include "object-store.h" 19 19 #include "lockfile.h" 20 20 #include "exec-cmd.h" 21 + #include "wrapper.h" 21 22 22 23 static int get_st_mode_bits(const char *path, int *mode) 23 24 {
+1
refs/packed-backend.c
··· 9 9 #include "../iterator.h" 10 10 #include "../lockfile.h" 11 11 #include "../chdir-notify.h" 12 + #include "../wrapper.h" 12 13 #include "../write-or-die.h" 13 14 14 15 enum mmap_strategy {
+1
send-pack.c
··· 14 14 #include "quote.h" 15 15 #include "transport.h" 16 16 #include "version.h" 17 + #include "wrapper.h" 17 18 #include "oid-array.h" 18 19 #include "gpg-interface.h" 19 20 #include "shallow.h"
+1
setup.c
··· 12 12 #include "promisor-remote.h" 13 13 #include "quote.h" 14 14 #include "trace2.h" 15 + #include "wrapper.h" 15 16 16 17 static int inside_git_dir = -1; 17 18 static int inside_work_tree = -1;
+1
upload-pack.c
··· 32 32 #include "commit-graph.h" 33 33 #include "commit-reach.h" 34 34 #include "shallow.h" 35 + #include "wrapper.h" 35 36 #include "write-or-die.h" 36 37 37 38 /* Remember to update object flag allocation in object.h */