mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
parent
48c7cfcb74
commit
47fb506da2
@ -5,7 +5,7 @@ AC_CHECK_TYPE(uint64_t, unsigned long long)
|
||||
AC_CHECK_TYPE(comparison_fn_t,
|
||||
[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
|
||||
|
||||
AC_CHECK_FUNCS(strerror timegm strnlen)
|
||||
AC_CHECK_FUNCS(strerror timegm strnlen setenv)
|
||||
AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq)
|
||||
AC_HAVE_DECL(errno, [#include <errno.h>])
|
||||
|
||||
|
@ -67,3 +67,20 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
int setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
char *p = NULL;
|
||||
int ret = -1;
|
||||
|
||||
asprintf(&p, "%s=%s", name, value);
|
||||
|
||||
if (overwrite || getenv(name)) {
|
||||
if (p) ret = putenv(p);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user