From 66b0a6cc51a3987c489cc71a17c0da632bf6a6bc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 16 Apr 2007 12:43:54 +0000 Subject: [PATCH] r22264: merge from samba4: use AC_HAVE_DECL() because AC_CHECK_DECLS() defines to 1 or 0 and #ifndef doesn't work. metze --- source/lib/replace/libreplace.m4 | 2 +- source/lib/replace/replace.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4 index ab7c83f9dd4..e9b19b7cf51 100644 --- a/source/lib/replace/libreplace.m4 +++ b/source/lib/replace/libreplace.m4 @@ -263,7 +263,7 @@ 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_HAVE_DECL(setenv, [#include ]) AC_CHECK_FUNCS(setenv unsetenv) AC_CHECK_FUNCS(strnlen) diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h index 3b09216257f..a5455be2b68 100644 --- a/source/lib/replace/replace.h +++ b/source/lib/replace/replace.h @@ -162,7 +162,7 @@ size_t rep_strnlen(const char *s, size_t n); #define setenv rep_setenv int rep_setenv(const char *name, const char *value, int overwrite); #else -#ifndef HAVE_DECL_SETENV +#ifndef HAVE_SETENV_DECL int setenv(const char *name, const char *value, int overwrite); #endif #endif -- 2.34.1