From: Stefan Metzmacher Date: Mon, 16 Apr 2007 09:20:52 +0000 (+0000) Subject: r22252: merge from samba4: X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~705 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=42ccfaf5e58d92e04ba490f726e5d6972039bdc4;p=samba.git r22252: merge from samba4: add prototype of setenv metze --- diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4 index 33cd0894c10..ab7c83f9dd4 100644 --- a/source/lib/replace/libreplace.m4 +++ b/source/lib/replace/libreplace.m4 @@ -263,7 +263,9 @@ AC_CHECK_HEADERS([sys/param.h limits.h]) AC_CHECK_TYPE(comparison_fn_t, [AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])]) +AC_CHECK_DECLS([setenv, unsetenv]) AC_CHECK_FUNCS(setenv unsetenv) + AC_CHECK_FUNCS(strnlen) AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq) diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h index 959d44b33e7..3b09216257f 100644 --- a/source/lib/replace/replace.h +++ b/source/lib/replace/replace.h @@ -160,7 +160,11 @@ size_t rep_strnlen(const char *s, size_t n); #ifndef HAVE_SETENV #define setenv rep_setenv -int rep_setenv(const char *name, const char *value, int overwrite); +int rep_setenv(const char *name, const char *value, int overwrite); +#else +#ifndef HAVE_DECL_SETENV +int setenv(const char *name, const char *value, int overwrite); +#endif #endif #ifndef HAVE_UNSETENV