diff options
author | Paul Betts <paul@paulbetts.org> | 2011-09-21 22:17:30 +0400 |
---|---|---|
committer | Paul Betts <paul@paulbetts.org> | 2011-09-21 23:00:34 +0400 |
commit | e1b86444676b70154bf8ab450d429bdef57a8276 (patch) | |
tree | 020b42f514cd78ddd44b4d38e0f57cd88f17616f /src/posix.c | |
parent | e3ecf7e9ab043e44ffd94729f27e3a0c434c355a (diff) |
Rewrite getenv to use Win32 version on Windows
Diffstat (limited to 'src/posix.c')
-rw-r--r-- | src/posix.c | 9 |
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) |