summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-07-01 17:26:23 +0200
committerVicent Marti <tanoku@gmail.com>2011-07-01 17:26:23 +0200
commit17d523041df6247c21160cb19fa0e783ae40e43c (patch)
tree2ee8bdcd51b1eea9b2e23b7a5d2a289d284b1606 /src
parentb2cef77ccf52b1fb55f8e1ca98ada48bbfe90b92 (diff)
downloadlibgit2-17d523041df6247c21160cb19fa0e783ae40e43c.tar.gz
build: Simplify build structure
This will make libgit2 more suitable for embedding.
Diffstat (limited to 'src')
-rw-r--r--src/hash.c4
-rw-r--r--src/map_posix.c (renamed from src/unix/map.c)5
-rw-r--r--src/sha1.c (renamed from src/block-sha1/sha1.c)0
-rw-r--r--src/sha1.h (renamed from src/block-sha1/sha1.h)0
4 files changed, 5 insertions, 4 deletions
diff --git a/src/hash.c b/src/hash.c
index 775e4b4c1..b8b311bcb 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -28,10 +28,8 @@
#if defined(PPC_SHA1)
# include "ppc/sha1.h"
-#elif defined(OPENSSL_SHA1)
-# include <openssl/sha.h>
#else
-# include "block-sha1/sha1.h"
+# include "sha1.h"
#endif
struct git_hash_ctx {
diff --git a/src/unix/map.c b/src/map_posix.c
index 9bc6178ed..1f50bcf2e 100644
--- a/src/unix/map.c
+++ b/src/map_posix.c
@@ -1,9 +1,11 @@
+#include <git2/common.h>
+
+#ifndef GIT_WIN32
#include "map.h"
#include <sys/mman.h>
#include <errno.h>
-
int git__mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset)
{
int mprot = 0;
@@ -58,4 +60,5 @@ int git__munmap(git_map *map)
return GIT_SUCCESS;
}
+#endif
diff --git a/src/block-sha1/sha1.c b/src/sha1.c
index 8c1460102..8c1460102 100644
--- a/src/block-sha1/sha1.c
+++ b/src/sha1.c
diff --git a/src/block-sha1/sha1.h b/src/sha1.h
index 558d6aece..558d6aece 100644
--- a/src/block-sha1/sha1.h
+++ b/src/sha1.h