summaryrefslogtreecommitdiff
path: root/source3/lib/replace.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-04 15:54:04 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-04 15:54:04 +0000
commite34e25d907ee92063fd2466a1634b961e292cc0f (patch)
treee47bb2ab6755df1e37082c6166d03f3183ec9195 /source3/lib/replace.c
parent767784550642439ccc86f96f3894490774448f10 (diff)
downloadsamba-e34e25d907ee92063fd2466a1634b961e292cc0f.tar.gz
samba-e34e25d907ee92063fd2466a1634b961e292cc0f.tar.bz2
samba-e34e25d907ee92063fd2466a1634b961e292cc0f.zip
more solaris 2.5 fixups. It now seems to be working pretty well.
(This used to be commit c4e450817886b40474cebdfc50c0c16fb4646baf)
Diffstat (limited to 'source3/lib/replace.c')
-rw-r--r--source3/lib/replace.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/replace.c b/source3/lib/replace.c
index 6441efe44c..948dfdf9c8 100644
--- a/source3/lib/replace.c
+++ b/source3/lib/replace.c
@@ -293,3 +293,21 @@ char *rep_inet_ntoa(struct in_addr ip)
return buf;
}
#endif
+
+
+#ifndef HAVE_SETENV
+/*****************************************************************
+set an env variable - some systems don't have this
+*****************************************************************/
+ int setenv(const char *name, const char *value, int overwrite)
+{
+ pstring s;
+
+ if (!overwrite && getenv(name)) return 0;
+
+ slprintf(s,sizeof(s)-1,"%s=%s", name, value);
+
+ return putenv(s);
+}
+
+#endif