@@ -2483,7 +2483,7 @@ typedef struct {
int newmode;
} _startupinfo;
-extern int __wgetmainargs(int *argc, wchar_t ***argv, wchar_t ***env, int glob,
+int __wgetmainargs(int *argc, wchar_t ***argv, wchar_t ***env, int glob,
_startupinfo *si);
static NORETURN void die_startup(void)
@@ -197,7 +197,7 @@ void obstack_free (struct obstack *, void *);
more memory. This can be set to a user defined function which
should either abort gracefully or use longjump - but shouldn't
return. The default action is to print a message and abort. */
-void (*obstack_alloc_failed_handler) (void);
+extern void (*obstack_alloc_failed_handler) (void);
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
new file mode 100644
@@ -0,0 +1,6 @@
+@@
+type T;
+identifier f;
+@@
+- extern
+ T f(...);
@@ -13,7 +13,7 @@ struct delta_index;
* before free_delta_index() is called. The returned pointer must be freed
* using free_delta_index().
*/
-extern struct delta_index *
+struct delta_index *
create_delta_index(const void *buf, unsigned long bufsize);
/*
@@ -40,7 +40,7 @@ unsigned long sizeof_delta_index(struct delta_index *index);
* returned and *delta_size is updated with its size. The returned buffer
* must be freed by the caller.
*/
-extern void *
+void *
create_delta(const struct delta_index *index,
const void *buf, unsigned long bufsize,
unsigned long *delta_size, unsigned long max_delta_size);
@@ -484,9 +484,9 @@ static inline int const_error(void)
void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
void set_error_routine(void (*routine)(const char *err, va_list params));
-void (*get_error_routine(void))(const char *err, va_list params);
+extern void (*get_error_routine(void))(const char *err, va_list params);
void set_warn_routine(void (*routine)(const char *warn, va_list params));
-void (*get_warn_routine(void))(const char *warn, va_list params);
+extern void (*get_warn_routine(void))(const char *warn, va_list params);
void set_die_is_recursing_routine(int (*routine)(void));
int starts_with(const char *str, const char *prefix);
@@ -43,7 +43,7 @@ void for_each_file_in_pack_dir(const char *objdir,
#define PACKDIR_FILE_PACK 1
#define PACKDIR_FILE_IDX 2
#define PACKDIR_FILE_GARBAGE 4
-void (*report_garbage)(unsigned seen_bits, const char *path);
+extern void (*report_garbage)(unsigned seen_bits, const char *path);
void reprepare_packed_git(struct repository *r);
void install_packed_git(struct repository *r, struct packed_git *pack);
@@ -10,7 +10,7 @@
#include <string.h>
#include "sha1.h"
-extern void ppc_sha1_core(uint32_t *hash, const unsigned char *p,
+void ppc_sha1_core(uint32_t *hash, const unsigned char *p,
unsigned int nblocks);
int ppc_SHA1_Init(ppc_SHA_CTX *c)