Commit 0c9a5565f7f4fdf70c72c5a92a1deeef7aaac6e3

Sascha Cunz 2012-05-11T04:12:18

Add missing GIT_EXTERN declarations

diff --git a/include/git2/oid.h b/include/git2/oid.h
index 566d13a..87efbab 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -183,7 +183,7 @@ typedef struct git_oid_shorten git_oid_shorten;
  *		be unique.
  *	@return a `git_oid_shorten` instance, NULL if OOM
  */
-git_oid_shorten *git_oid_shorten_new(size_t min_length);
+GIT_EXTERN(git_oid_shorten *) git_oid_shorten_new(size_t min_length);
 
 /**
  * Add a new OID to set of shortened OIDs and calculate
@@ -209,14 +209,14 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length);
  *		added so far to the set; or an error code (<0) if an
  *		error occurs.
  */
-int git_oid_shorten_add(git_oid_shorten *os, const char *text_oid);
+GIT_EXTERN(int) git_oid_shorten_add(git_oid_shorten *os, const char *text_oid);
 
 /**
  * Free an OID shortener instance
  *
  * @param os a `git_oid_shorten` instance
  */
-void git_oid_shorten_free(git_oid_shorten *os);
+GIT_EXTERN(void) git_oid_shorten_free(git_oid_shorten *os);
 
 /** @} */
 GIT_END_DECL
diff --git a/include/git2/refspec.h b/include/git2/refspec.h
index 28afe65..50aa596 100644
--- a/include/git2/refspec.h
+++ b/include/git2/refspec.h
@@ -25,7 +25,7 @@ GIT_BEGIN_DECL
  * @param refspec the refspec
  * @return the refspec's source specifier
  */
-const char *git_refspec_src(const git_refspec *refspec);
+GIT_EXTERN(const char *) git_refspec_src(const git_refspec *refspec);
 
 /**
  * Get the destination specifier
@@ -33,7 +33,7 @@ const char *git_refspec_src(const git_refspec *refspec);
  * @param refspec the refspec
  * @return the refspec's destination specifier
  */
-const char *git_refspec_dst(const git_refspec *refspec);
+GIT_EXTERN(const char *) git_refspec_dst(const git_refspec *refspec);
 
 /**
  * Check if a refspec's source descriptor matches a reference 
@@ -42,7 +42,7 @@ const char *git_refspec_dst(const git_refspec *refspec);
  * @param refname the name of the reference to check
  * @return 1 if the refspec matches, 0 otherwise
  */
-int git_refspec_src_matches(const git_refspec *refspec, const char *refname);
+GIT_EXTERN(int) git_refspec_src_matches(const git_refspec *refspec, const char *refname);
 
 /**
  * Transform a reference to its target following the refspec's rules
@@ -53,7 +53,7 @@ int git_refspec_src_matches(const git_refspec *refspec, const char *refname);
  * @param name the name of the reference to transform
  * @return GIT_SUCCESS, GIT_ESHORTBUFFER or another error
  */
-int git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
+GIT_EXTERN(int) git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
 
 GIT_END_DECL
 
diff --git a/include/git2/tree.h b/include/git2/tree.h
index 972c379..f75cc1c 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -343,9 +343,9 @@ typedef int (*git_tree_diff_cb)(const git_tree_diff_data *ptr, void *data);
  * @param data data to give to the callback
  * @return GIT_SUCCESS or an error code
  */
-int git_tree_diff(git_tree *old, git_tree *newer, git_tree_diff_cb cb, void *data);
+GIT_EXTERN(int) git_tree_diff(git_tree *old, git_tree *newer, git_tree_diff_cb cb, void *data);
 
-int git_tree_diff_index_recursive(git_tree *tree, git_index *index, git_tree_diff_cb cb, void *data);
+GIT_EXTERN(int) git_tree_diff_index_recursive(git_tree *tree, git_index *index, git_tree_diff_cb cb, void *data);
 
 /** @} */