summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-23 23:21:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:38 -0500
commitfe791078b71cc103de10fc7c82302ea8ee19e447 (patch)
tree1e6fb733a7c1dbf1069c54f720bc4297e36e88ca /source4/lib/replace
parent47fb506da2f1ff00f538ec30120c816ad0eeab37 (diff)
downloadsamba-fe791078b71cc103de10fc7c82302ea8ee19e447.tar.gz
samba-fe791078b71cc103de10fc7c82302ea8ee19e447.tar.bz2
samba-fe791078b71cc103de10fc7c82302ea8ee19e447.zip
r17763: moved setenv to ldb/replace/
(This used to be commit ed2dbc4dfe4556831c809dab24e3833cd2018138)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/config.m42
-rw-r--r--source4/lib/replace/replace.c19
2 files changed, 1 insertions, 20 deletions
diff --git a/source4/lib/replace/config.m4 b/source4/lib/replace/config.m4
index 0fda967c54..93f0bb34a7 100644
--- a/source4/lib/replace/config.m4
+++ b/source4/lib/replace/config.m4
@@ -48,7 +48,7 @@ AC_TRY_COMPILE([
AC_CHECK_HEADERS(sys/syslog.h syslog.h)
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
-AC_CHECK_FUNCS(setenv vsyslog setlinebuf mktime ftruncate chsize rename)
+AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup)
AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp)
AC_HAVE_DECL(setresuid, [#include <unistd.h>])
diff --git a/source4/lib/replace/replace.c b/source4/lib/replace/replace.c
index b74cd7f95a..b8f4bc1c3c 100644
--- a/source4/lib/replace/replace.c
+++ b/source4/lib/replace/replace.c
@@ -368,25 +368,6 @@ duplicate a string
#endif /* HAVE_VSYSLOG */
-#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
-
-
#ifndef HAVE_STRNDUP
/**
Some platforms don't have strndup.