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"
|
||||
|
||||
void gitunsetenv (const char *name)
|
||||
int gitunsetenv(const char *name)
|
||||
{
|
||||
#if !defined(__MINGW32__)
|
||||
extern char **environ;
|
||||
@ -24,4 +24,6 @@ void gitunsetenv (const char *name)
|
||||
++dst;
|
||||
}
|
||||
environ[dst] = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -729,7 +729,7 @@ char *gitmkdtemp(char *);
|
||||
|
||||
#ifdef NO_UNSETENV
|
||||
#define unsetenv gitunsetenv
|
||||
void gitunsetenv(const char *);
|
||||
int gitunsetenv(const char *);
|
||||
#endif
|
||||
|
||||
#ifdef NO_STRCASESTR
|
||||
|
Loading…
Reference in New Issue
Block a user