Add #undef and other protection of macros.
fi
])dnl
dnl
-dnl ====================================================================
-dnl Check to see if we should not declare strdup if we have it
-dnl
-AC_DEFUN([OL_DECL_STRDUP],
-[
-AC_MSG_CHECKING([strdup declaration])
-AC_CACHE_VAL(ol_cv_dcl_strdup,[
- AC_TRY_COMPILE([
-#include <string.h> ],
- [extern char *(strdup)();],
- [ol_cv_dcl_strdup=yes],
- [ol_cv_dcl_strdup=no])])
-AC_MSG_RESULT($ol_cv_dcl_strdup)
-if test $ol_cv_dcl_strdup = yes ; then
- AC_DEFINE(DECL_STRDUP,1,
- [define if you have strdup() but it's not declared])
-fi
-])dnl
-
dnl ====================================================================
dnl Early MIPS compilers (used in Ultrix 4.2) don't like
dnl "int x; int *volatile a = &x; *a = 0;"
-echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
-echo "configure:11232: checking strdup declaration" >&5
-if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 11238 "configure"
-#include "confdefs.h"
-
-#include <string.h>
-int main() {
-extern char *(strdup)();
-; return 0; }
-EOF
-if { (eval echo configure:11246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ol_cv_dcl_strdup=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ol_cv_dcl_strdup=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
-if test $ol_cv_dcl_strdup = yes ; then
- cat >> confdefs.h <<\EOF
-#define DECL_STRDUP 1
-EOF
-
-fi
-
-
-
if test "$ol_enable_debug" != no ; then
cat >> confdefs.h <<\EOF
#define LDAP_DEBUG 1
# Check Configuration
OL_SYS_ERRLIST
-dnl ----------------------------------------------------------------
-dnl Check our declaration of strdup()
-OL_DECL_STRDUP
-
dnl ----------------------------------------------------------------
dnl Sort out defines
#ifndef _AC_ASSERT_H
#define _AC_ASSERT_H
+#undef assert
+
#ifdef LDAP_DEBUG
#if defined( HAVE_ASSERT_H ) || defined( STDC_HEADERS )
#include <ctype.h>
+#undef TOUPPER
+#undef TOLOWER
+
#ifdef C_UPPER_LOWER
# define TOUPPER(c) (islower(c) ? toupper(c) : (c))
# define TOLOWER(c) (isupper(c) ? tolower(c) : (c))
#include <signal.h>
+#undef SIGNAL
#ifdef HAVE_SIGSET
#define SIGNAL sigset
#else
# undef strdup
# define strdup(s) ldap_pvt_strdup(s)
#else
-# ifdef DECL_STRDUP
- /* some systems fail to declare strdup */
- extern char *(strdup)();
-# endif
+ /* some systems fail to declare strdup */
+ extern char *(strdup)();
#endif
/*
struct hostent **result,
int *herrno_ptr ));
-LDAP_F( void )
-ldap_pvt_init_utils LDAP_P(( void ));
-
LDAP_END_DECL
#endif
/* define if you actually have sys_errlist in your libs */
#undef HAVE_SYS_ERRLIST
-/* define if you have strdup() but it's not declared */
-#undef DECL_STRDUP
-
/* begin of postamble */
#ifdef HAVE_STDDEF_H