mirror of
https://github.com/git/git
synced 2024-10-06 08:39:27 +00:00
Merge branch 'jc/unsetenv-returns-an-int'
The compatibility implementation for unsetenv(3) were written to mimic ancient, non-POSIX, variant seen in an old glibc; it has been changed to return an integer to match the more modern era. * jc/unsetenv-returns-an-int: unsetenv(3) returns int, not void
This commit is contained in:
commit
0ae87432aa
|
@ -1,6 +1,6 @@
|
||||||
#include "../git-compat-util.h"
|
#include "../git-compat-util.h"
|
||||||
|
|
||||||
void gitunsetenv (const char *name)
|
int gitunsetenv(const char *name)
|
||||||
{
|
{
|
||||||
#if !defined(__MINGW32__)
|
#if !defined(__MINGW32__)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
@ -24,4 +24,6 @@ void gitunsetenv (const char *name)
|
||||||
++dst;
|
++dst;
|
||||||
}
|
}
|
||||||
environ[dst] = NULL;
|
environ[dst] = NULL;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -729,7 +729,7 @@ char *gitmkdtemp(char *);
|
||||||
|
|
||||||
#ifdef NO_UNSETENV
|
#ifdef NO_UNSETENV
|
||||||
#define unsetenv gitunsetenv
|
#define unsetenv gitunsetenv
|
||||||
void gitunsetenv(const char *);
|
int gitunsetenv(const char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NO_STRCASESTR
|
#ifdef NO_STRCASESTR
|
||||||
|
|
Loading…
Reference in a new issue