summaryrefslogtreecommitdiffstats
path: root/source/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
commitc4e450817886b40474cebdfc50c0c16fb4646baf (patch)
treea14cc53c714bc012846c00a29f3174defd5a8a15 /source/lib/replace.c
parent269a7938fcf7eddc68c40e3a8d3d47bdac48704d (diff)
downloadsamba-c4e450817886b40474cebdfc50c0c16fb4646baf.tar.gz
samba-c4e450817886b40474cebdfc50c0c16fb4646baf.tar.xz
samba-c4e450817886b40474cebdfc50c0c16fb4646baf.zip
more solaris 2.5 fixups. It now seems to be working pretty well.
Diffstat (limited to 'source/lib/replace.c')
-rw-r--r--source/lib/replace.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/lib/replace.c b/source/lib/replace.c
index 6441efe44c7..948dfdf9c88 100644
--- a/source/lib/replace.c
+++ b/source/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