svn commit: samba r17762 - in
branches/SAMBA_4_0/source/lib/ldb/replace: .
tridge at samba.org
tridge at samba.org
Wed Aug 23 23:20:51 GMT 2006
Author: tridge
Date: 2006-08-23 23:20:50 +0000 (Wed, 23 Aug 2006)
New Revision: 17762
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17762
Log:
HPUX needs setenv
Modified:
branches/SAMBA_4_0/source/lib/ldb/replace/config.m4
branches/SAMBA_4_0/source/lib/ldb/replace/replace.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/replace/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/replace/config.m4 2006-08-23 22:33:50 UTC (rev 17761)
+++ branches/SAMBA_4_0/source/lib/ldb/replace/config.m4 2006-08-23 23:20:50 UTC (rev 17762)
@@ -5,7 +5,7 @@
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>])
Modified: branches/SAMBA_4_0/source/lib/ldb/replace/replace.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/replace/replace.c 2006-08-23 22:33:50 UTC (rev 17761)
+++ branches/SAMBA_4_0/source/lib/ldb/replace/replace.c 2006-08-23 23:20:50 UTC (rev 17762)
@@ -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
More information about the samba-cvs
mailing list