Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Betts <paul@paulbetts.org>2011-09-21 22:17:30 +0400
committerPaul Betts <paul@paulbetts.org>2011-09-21 23:00:34 +0400
commite1b86444676b70154bf8ab450d429bdef57a8276 (patch)
tree020b42f514cd78ddd44b4d38e0f57cd88f17616f /src/posix.c
parente3ecf7e9ab043e44ffd94729f27e3a0c434c355a (diff)
Rewrite getenv to use Win32 version on Windows
Diffstat (limited to 'src/posix.c')
-rw-r--r--src/posix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/posix.c b/src/posix.c
index 1b85b053d..fb8ce37cb 100644
--- a/src/posix.c
+++ b/src/posix.c
@@ -39,6 +39,15 @@ int p_getcwd(char *buffer_out, size_t size)
return GIT_SUCCESS;
}
+char* p_getenv(const char* name)
+{
+ char* buf = getenv(name);
+ if (!buf)
+ return buf;
+
+ return git__strdup(buf);
+}
+
#endif
int p_read(git_file fd, void *buf, size_t cnt)