From 80bbe0bfd19e6609f77d0069d112c35d88b81d10 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Tue, 18 Oct 2016 11:40:57 -0400 Subject: [PATCH] Ticket 48978 - Fix logging format errors and replace LDAP_DEBUG Description: This patch fixes a few format issues where the plugin name was not used for the subsystem. Also replaced the LDAP_DEBUG flag with a more appropriate name. Also removed the logging macro from slapi-plugin.h https://fedorahosted.org/389/ticket/48978 Reviewed by: ? --- Makefile.in | 49 +++-- aclocal.m4 | 194 ++++++++++------ config.h.in | 9 +- configure | 244 ++++++++++----------- configure.ac | 6 +- .../plugins/acct_usability/acct_usability.h | 1 + ldap/servers/plugins/acctpolicy/acct_config.c | 2 +- ldap/servers/plugins/acctpolicy/acct_init.c | 2 +- ldap/servers/plugins/acctpolicy/acct_plugin.c | 2 +- ldap/servers/plugins/acctpolicy/acct_util.c | 2 +- ldap/servers/plugins/acctpolicy/acctpolicy.h | 1 + ldap/servers/plugins/automember/automember.h | 1 + ldap/servers/plugins/deref/deref.h | 1 + ldap/servers/plugins/linkedattrs/linked_attrs.h | 1 + ldap/servers/plugins/mep/mep.h | 1 + .../plugins/posix-winsync/posix-group-func.c | 3 +- .../plugins/posix-winsync/posix-group-func.h | 2 + .../plugins/posix-winsync/posix-group-task.c | 5 +- .../plugins/posix-winsync/posix-winsync-config.c | 6 +- .../plugins/posix-winsync/posix-wsp-ident.h | 1 + ldap/servers/plugins/pwdstorage/pwdstorage.h | 1 + .../plugins/replication/repl_session_plugin.c | 22 +- ldap/servers/plugins/replication/windows_private.c | 37 ++-- ldap/servers/plugins/retrocl/retrocl.h | 1 - ldap/servers/plugins/rootdn_access/rootdn_access.h | 1 + ldap/servers/plugins/statechange/statechange.c | 1 + ldap/servers/plugins/sync/sync.h | 1 + ldap/servers/plugins/uiduniq/7bit.c | 3 +- ldap/servers/plugins/uiduniq/plugin-utils.h | 3 +- ldap/servers/plugins/uiduniq/uid.c | 3 +- ldap/servers/plugins/whoami/whoami.c | 1 + ldap/servers/slapd/back-ldbm/filterindex.c | 4 +- ldap/servers/slapd/back-ldbm/index.c | 6 +- ldap/servers/slapd/daemon.c | 6 +- ldap/servers/slapd/main.c | 10 +- ldap/servers/slapd/modify.c | 4 +- ldap/servers/slapd/slapi-plugin.h | 8 - ldap/servers/slapd/slapi-private.h | 8 + ldap/servers/slapd/tools/ldaptool.h | 2 +- 39 files changed, 368 insertions(+), 287 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0ec903a..c258f78 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -93,12 +103,6 @@ noinst_PROGRAMS = makstrdb$(EXEEXT) @SOLARIS_TRUE@am__append_2 = -lrt @SOLARIS_TRUE@am__append_3 = ldap/servers/slapd/tools/ldclt/opCheck.c subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(top_srcdir)/rpm/389-ds-base.spec.in \ - depcomp $(dist_man_MANS) $(dist_noinst_DATA) \ - $(dist_noinst_HEADERS) $(serverinc_HEADERS) README compile \ - config.guess config.sub install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -113,6 +117,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_noinst_DATA) \ + $(dist_noinst_HEADERS) $(serverinc_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -1255,6 +1262,10 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/rpm/389-ds-base.spec.in \ + README compile config.guess config.sub depcomp install-sh \ + ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -3255,7 +3266,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -3276,8 +3286,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -10374,10 +10384,16 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -10412,16 +10428,17 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -10749,6 +10766,8 @@ uninstall-man: uninstall-man1 uninstall-man8 uninstall-systemdsystemunitDATA uninstall-taskSCRIPTS \ uninstall-updateDATA uninstall-updateSCRIPTS +.PRECIOUS: Makefile + clean-local: -rm -rf dist diff --git a/aclocal.m4 b/aclocal.m4 index 58e04a0..8d926b8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.4])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -123,15 +123,14 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_COND_IF -*- Autoconf -*- -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -168,7 +167,7 @@ fi[]dnl # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -199,7 +198,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -390,7 +389,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -466,7 +465,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -475,6 +474,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -550,8 +555,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -583,6 +588,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -591,7 +641,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -613,7 +662,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -624,7 +673,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -634,7 +683,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -656,7 +705,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -691,7 +740,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -739,41 +788,9 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -812,7 +829,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -841,7 +858,54 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -860,7 +924,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -941,7 +1005,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1001,7 +1065,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1029,7 +1093,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1048,7 +1112,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/config.h.in b/config.h.in index bd35ed6..2b2298f 100644 --- a/config.h.in +++ b/config.h.in @@ -325,12 +325,12 @@ /* Use FHS optional layout */ #undef IS_FHS_OPT -/* LDAP debug flag */ -#undef LDAP_DEBUG - /* Don't use smartheap */ #undef LDAP_DONT_USE_SMARTHEAP +/* LDAP error logging flag */ +#undef LDAP_ERROR_LOGGING + /* Linux */ #undef LINUX @@ -356,9 +356,6 @@ /* no getdomainname */ #undef NO_DOMAINNAME -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* OS version */ #undef OSVERSION diff --git a/configure b/configure index 9ff2de5..f5a5523 100755 --- a/configure +++ b/configure @@ -2819,7 +2819,7 @@ cat >>confdefs.h <<_ACEOF #define DS_PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -am__api_version='1.13' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -3020,8 +3020,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3040,7 +3040,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3359,8 +3359,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -3461,6 +3461,48 @@ $as_echo "$am_cv_prog_tar_pax" >&6; } +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + # define these for automake distdir VERSION=$PACKAGE_VERSION PACKAGE=$PACKAGE_TARNAME @@ -4811,6 +4853,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4939,131 +5040,6 @@ else fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - # By default we simply use the C compiler to build assembly code. @@ -22411,7 +22387,11 @@ fi # AC_DEFINE([USE_OLD_UNHASHED], [], [Use old unhashed code]) -$as_echo "#define LDAP_DEBUG 1" >>confdefs.h +# Internally we use a macro function slapi_log_err() to call slapi_log_error() +# which gives us the option to do performance testing without the presence of +# logging. To remove the presence of error logging undefine LDAP_ERROR_LOGGING. + +$as_echo "#define LDAP_ERROR_LOGGING 1" >>confdefs.h $as_echo "#define LDAP_DONT_USE_SMARTHEAP 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index 431e1c6..327452f 100644 --- a/configure.ac +++ b/configure.ac @@ -740,7 +740,11 @@ AC_SUBST(capbrand) AC_SUBST(vendor) # AC_DEFINE([USE_OLD_UNHASHED], [], [Use old unhashed code]) -AC_DEFINE([LDAP_DEBUG], [1], [LDAP debug flag]) + +# Internally we use a macro function slapi_log_err() to call slapi_log_error() +# which gives us the option to do performance testing without the presence of +# logging. To remove the presence of error logging undefine LDAP_ERROR_LOGGING. +AC_DEFINE([LDAP_ERROR_LOGGING], [1], [LDAP error logging flag]) AC_DEFINE([LDAP_DONT_USE_SMARTHEAP], [1], [Don't use smartheap]) # libtool on fedora/rhel contains some gcc-isms which cause problems diff --git a/ldap/servers/plugins/acct_usability/acct_usability.h b/ldap/servers/plugins/acct_usability/acct_usability.h index 9eb8596..d47acef 100644 --- a/ldap/servers/plugins/acct_usability/acct_usability.h +++ b/ldap/servers/plugins/acct_usability/acct_usability.h @@ -14,6 +14,7 @@ * Account Usability Control plug-in header file */ #include "slapi-plugin.h" +#include "slapi-private.h" /* * Plug-in defines diff --git a/ldap/servers/plugins/acctpolicy/acct_config.c b/ldap/servers/plugins/acctpolicy/acct_config.c index 175c714..b101f18 100644 --- a/ldap/servers/plugins/acctpolicy/acct_config.c +++ b/ldap/servers/plugins/acctpolicy/acct_config.c @@ -20,8 +20,8 @@ Hewlett-Packard Development Company, L.P. #include #include -#include "slapi-plugin.h" #include "acctpolicy.h" +#include "slapi-plugin.h" #include "nspr.h" /* Globals */ diff --git a/ldap/servers/plugins/acctpolicy/acct_init.c b/ldap/servers/plugins/acctpolicy/acct_init.c index ab62730..6bf6f4b 100644 --- a/ldap/servers/plugins/acctpolicy/acct_init.c +++ b/ldap/servers/plugins/acctpolicy/acct_init.c @@ -44,8 +44,8 @@ limitattrname: accountInactivityLimit #include #include -#include "slapi-plugin.h" #include "acctpolicy.h" +#include "slapi-plugin.h" static Slapi_PluginDesc plugin_desc = { PLUGIN_NAME, PLUGIN_VENDOR, PLUGIN_VERSION, PLUGIN_DESC }; diff --git a/ldap/servers/plugins/acctpolicy/acct_plugin.c b/ldap/servers/plugins/acctpolicy/acct_plugin.c index 00a95a2..27c27bc 100644 --- a/ldap/servers/plugins/acctpolicy/acct_plugin.c +++ b/ldap/servers/plugins/acctpolicy/acct_plugin.c @@ -24,8 +24,8 @@ Hewlett-Packard Development Company, L.P. #include #include #include -#include "slapi-plugin.h" #include "acctpolicy.h" +#include "slapi-plugin.h" /* * acct_policy_dn_is_config() diff --git a/ldap/servers/plugins/acctpolicy/acct_util.c b/ldap/servers/plugins/acctpolicy/acct_util.c index 918d6e7..1de52bd 100644 --- a/ldap/servers/plugins/acctpolicy/acct_util.c +++ b/ldap/servers/plugins/acctpolicy/acct_util.c @@ -23,8 +23,8 @@ Hewlett-Packard Development Company, L.P. #include #include #include -#include "slapi-plugin.h" #include "acctpolicy.h" +#include "slapi-plugin.h" /* Globals */ static void* plugin_id = NULL; diff --git a/ldap/servers/plugins/acctpolicy/acctpolicy.h b/ldap/servers/plugins/acctpolicy/acctpolicy.h index 77da178..3b5141d 100644 --- a/ldap/servers/plugins/acctpolicy/acctpolicy.h +++ b/ldap/servers/plugins/acctpolicy/acctpolicy.h @@ -19,6 +19,7 @@ Hewlett-Packard Development Company, L.P. ******************************************************************************/ #include /* ULONG_MAX */ +#include "slapi-private.h" #include "nspr.h" #define CFG_LASTLOGIN_STATE_ATTR "stateAttrName" diff --git a/ldap/servers/plugins/automember/automember.h b/ldap/servers/plugins/automember/automember.h index 07e7fe6..81bb65a 100644 --- a/ldap/servers/plugins/automember/automember.h +++ b/ldap/servers/plugins/automember/automember.h @@ -20,6 +20,7 @@ #include "portable.h" #include "nspr.h" #include "slapi-plugin.h" +#include "slapi-private.h" #include "prclist.h" #include "ldif.h" diff --git a/ldap/servers/plugins/deref/deref.h b/ldap/servers/plugins/deref/deref.h index d577f0a..647699f 100644 --- a/ldap/servers/plugins/deref/deref.h +++ b/ldap/servers/plugins/deref/deref.h @@ -14,6 +14,7 @@ * Dereference plug-in header file */ #include "slapi-plugin.h" +#include "slapi-private.h" /* * Plug-in defines diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.h b/ldap/servers/plugins/linkedattrs/linked_attrs.h index 6a6368e..4b07a96 100644 --- a/ldap/servers/plugins/linkedattrs/linked_attrs.h +++ b/ldap/servers/plugins/linkedattrs/linked_attrs.h @@ -20,6 +20,7 @@ #include "portable.h" #include "nspr.h" #include "slapi-plugin.h" +#include "slapi-private.h" #include "prclist.h" #include "ldif.h" diff --git a/ldap/servers/plugins/mep/mep.h b/ldap/servers/plugins/mep/mep.h index 2874b87..91db585 100644 --- a/ldap/servers/plugins/mep/mep.h +++ b/ldap/servers/plugins/mep/mep.h @@ -22,6 +22,7 @@ #include "slapi-plugin.h" #include "prclist.h" #include "ldif.h" +#include "slapi-private.h" /* * Plug-in defines diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.c b/ldap/servers/plugins/posix-winsync/posix-group-func.c index 9827235..9318561 100644 --- a/ldap/servers/plugins/posix-winsync/posix-group-func.c +++ b/ldap/servers/plugins/posix-winsync/posix-group-func.c @@ -18,10 +18,9 @@ $Id: posix-group-func.c 28 2011-05-13 14:35:29Z grzemba $ */ #include -#include "slapi-plugin.h" -#include #include "posix-wsp-ident.h" #include "posix-group-func.h" +#include "slapi-plugin.h" #define MAX_RECURSION_DEPTH (5) diff --git a/ldap/servers/plugins/posix-winsync/posix-group-func.h b/ldap/servers/plugins/posix-winsync/posix-group-func.h index dc5e6c7..1e30839 100644 --- a/ldap/servers/plugins/posix-winsync/posix-group-func.h +++ b/ldap/servers/plugins/posix-winsync/posix-group-func.h @@ -5,6 +5,8 @@ #ifndef POSIX_GROUP_WINSYNC_H #define POSIX_GROUP_WINSYNC_H +#include "slapi-private.h" + /* Slapi_PBlock *searchDN( const char *baseDN, const char *filter, char *attrs[] ); Slapi_PBlock * dnHasObjectClass( const char *baseDN, const char *objectClass, Slapi_Entry **entry ); diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c b/ldap/servers/plugins/posix-winsync/posix-group-task.c index 9d1aafe..f010090 100644 --- a/ldap/servers/plugins/posix-winsync/posix-group-task.c +++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c @@ -1,9 +1,8 @@ -#include "slapi-plugin.h" -#include "nspr.h" #include - #include "posix-wsp-ident.h" #include "posix-group-func.h" +#include "slapi-plugin.h" + typedef struct _task_data { diff --git a/ldap/servers/plugins/posix-winsync/posix-winsync-config.c b/ldap/servers/plugins/posix-winsync/posix-winsync-config.c index cd6cb51..614a942 100644 --- a/ldap/servers/plugins/posix-winsync/posix-winsync-config.c +++ b/ldap/servers/plugins/posix-winsync/posix-winsync-config.c @@ -10,6 +10,9 @@ $HeadURL: file:///storejet/svn/posix-winsync-plugin/trunk/posix-winsync-config.c $ */ +#include "posix-wsp-ident.h" +#include +#include "posix-group-func.h" #ifdef WINSYNC_TEST_POSIX #include #include "winsync-plugin.h" @@ -17,9 +20,6 @@ #include #include #endif -#include "posix-wsp-ident.h" -#include -#include "posix-group-func.h" #define POSIX_WINSYNC_CONFIG_FILTER "(objectclass=*)" /* diff --git a/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h b/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h index 9ddb194..603fa93 100644 --- a/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h +++ b/ldap/servers/plugins/posix-winsync/posix-wsp-ident.h @@ -5,6 +5,7 @@ #ifndef POSIX_WINSYNC_H #define POSIX_WINSYNC_H +#include "slapi-private.h" #define POSIX_WINSYNC_PLUGIN_NAME "posix-winsync" diff --git a/ldap/servers/plugins/pwdstorage/pwdstorage.h b/ldap/servers/plugins/pwdstorage/pwdstorage.h index 16ea745..1e085c7 100644 --- a/ldap/servers/plugins/pwdstorage/pwdstorage.h +++ b/ldap/servers/plugins/pwdstorage/pwdstorage.h @@ -15,6 +15,7 @@ #define _PWDSTORAGE_H #include "slapi-plugin.h" +#include "slapi-private.h" #include #include "nspr.h" #include "plbase64.h" diff --git a/ldap/servers/plugins/replication/repl_session_plugin.c b/ldap/servers/plugins/replication/repl_session_plugin.c index b8dd63f..5e452f3 100644 --- a/ldap/servers/plugins/replication/repl_session_plugin.c +++ b/ldap/servers/plugins/replication/repl_session_plugin.c @@ -25,8 +25,8 @@ repl_session_plugin_init() if((NULL == _ReplSessionAPI) && (slapi_apib_get_interface(REPL_SESSION_v1_0_GUID, &_ReplSessionAPI) || (NULL == _ReplSessionAPI))) { - slapi_log_err(SLAPI_LOG_PLUGIN, - "repl_session_plugin_init", "No replication session" + slapi_log_err(SLAPI_LOG_PLUGIN, repl_plugin_name, + "repl_session_plugin_init - No replication session" " plugin API registered for GUID [%s] -- end\n", REPL_SESSION_v1_0_GUID); } @@ -41,7 +41,8 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra) Slapi_DN *replarea = NULL; repl_session_plugin_agmt_init_cb initfunc = NULL; - slapi_log_err(SLAPI_LOG_PLUGIN, "repl_session_plugin_call_agmt_init_cb", "Begin\n"); + slapi_log_err(SLAPI_LOG_PLUGIN, repl_plugin_name, + "repl_session_plugin_call_agmt_init_cb - Begin\n"); if (_ReplSessionAPI) { initfunc = (repl_session_plugin_agmt_init_cb)_ReplSessionAPI[REPL_SESSION_PLUGIN_AGMT_INIT_CB]; @@ -49,7 +50,8 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra) if (initfunc) { replarea = agmt_get_replarea(ra); if (!replarea) { - slapi_log_err(SLAPI_LOG_ERR, "repl_session_plugin_call_agmt_init_cb", "Aborted - No replication area\n"); + slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name, + "repl_session_plugin_call_agmt_init_cb- Aborted - No replication area\n"); return; } cookie = (*initfunc)(replarea); @@ -58,7 +60,7 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra) agmt_set_priv(ra, cookie); - slapi_log_err(SLAPI_LOG_PLUGIN, "<-- repl_session_plugin_call_agmt_init_cb", " end\n"); + slapi_log_err(SLAPI_LOG_PLUGIN, repl_plugin_name, "repl_session_plugin_call_agmt_init_cb - End\n"); return; } @@ -78,7 +80,9 @@ repl_session_plugin_call_pre_acquire_cb(const Repl_Agmt *ra, int is_total, if (thefunc) { replarea = agmt_get_replarea(ra); if (!replarea) { - slapi_log_err(SLAPI_LOG_ERR, "repl_session_plugin_call_pre_acquire_cb", "Aborted - No replication area\n"); + slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name, + "repl_session_plugin_call_pre_acquire_cb " + "- Aborted - No replication area\n"); return 1; } rc = (*thefunc)(agmt_get_priv(ra), replarea, is_total, data_guid, data); @@ -103,7 +107,8 @@ repl_session_plugin_call_post_acquire_cb(const Repl_Agmt *ra, int is_total, if (thefunc) { replarea = agmt_get_replarea(ra); if (!replarea) { - slapi_log_err(SLAPI_LOG_ERR, "repl_session_plugin_call_post_acquire_cb", "Aborted - No replication area\n"); + slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name, + "repl_session_plugin_call_post_acquire_cb - Aborted - No replication area\n"); return 1; } rc = (*thefunc)(agmt_get_priv(ra), replarea, is_total, data_guid, data); @@ -162,7 +167,8 @@ repl_session_plugin_call_destroy_agmt_cb(const Repl_Agmt *ra) if (thefunc) { replarea = agmt_get_replarea(ra); if (!replarea) { - slapi_log_err(SLAPI_LOG_ERR, "repl_session_plugin_call_destroy_agmt_cb", "Aborted - No replication area\n"); + slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name, + "repl_session_plugin_call_destroy_agmt_cb - Aborted - No replication area\n"); return; } (*thefunc)(agmt_get_priv(ra), replarea); diff --git a/ldap/servers/plugins/replication/windows_private.c b/ldap/servers/plugins/replication/windows_private.c index 0de5002..d82a080 100644 --- a/ldap/servers/plugins/replication/windows_private.c +++ b/ldap/servers/plugins/replication/windows_private.c @@ -931,25 +931,20 @@ create_subtree_pairs(char **pairs) p0 = ldap_utf8strtok_r(*ptr, ":", &saveptr); p1 = ldap_utf8strtok_r(NULL, ":", &saveptr); if ((NULL == p0) || (NULL == p1)) { - slapi_log_err(SLAPI_LOG_ERR, - "create_subtree_pairs", - "Ignoring invalid subtree pairs \"%s\".\n", *ptr); + slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, + "create_subtree_pairs - Ignoring invalid subtree pairs \"%s\".\n", *ptr); continue; } spp->DSsubtree = slapi_sdn_new_dn_byval(p0); if (NULL == spp->DSsubtree) { - slapi_log_err(SLAPI_LOG_ERR, - "create_subtree_pairs", - "Ignoring invalid DS subtree \"%s\".\n", - p0); + slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, + "create_subtree_pairs - Ignoring invalid DS subtree \"%s\".\n", p0); continue; } spp->ADsubtree = slapi_sdn_new_dn_byval(p1); if (NULL == spp->ADsubtree) { - slapi_log_err(SLAPI_LOG_ERR, - "create_subtree_pairs", - "Ignoring invalid AD subtree \"%s\".\n", - p1); + slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, + "create_subtree_pairs - Ignoring invalid AD subtree \"%s\".\n", p1); slapi_sdn_free(&(spp->DSsubtree)); continue; } @@ -1027,7 +1022,7 @@ windows_private_set_windows_treetop(const Repl_Agmt *ra, char *treetop) dp->windows_treetop = treetop_sdn; } else { slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, - "windows_private_set_windows_treetop: " + "windows_private_set_windows_treetop - " "winSyncSubtreePair contains inconsistent Windows subtrees.\n"); dp->windows_treetop = NULL; } @@ -1090,7 +1085,7 @@ windows_private_set_directory_treetop(const Repl_Agmt *ra, char *treetop) dp->directory_treetop = treetop_sdn; } else { slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, - "windows_private_set_directory_treetop: " + "windows_private_set_directory_treetop - " "winSyncSubtreePair contains inconsistent Windows subtrees.\n"); dp->directory_treetop = NULL; } @@ -1232,9 +1227,11 @@ choke: } #ifdef FOR_DEBUGGING - slapi_log_err(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_private_update_dirsync_control: rc=%d\n", return_value); + slapi_log_err(SLAPI_LOG_TRACE, windows_repl_plugin_name, + "<= windows_private_update_dirsync_control - rc=%d\n", return_value); #else - slapi_log_err(SLAPI_LOG_TRACE, windows_repl_plugin_name, "<= windows_private_update_dirsync_control\n" ); + slapi_log_err(SLAPI_LOG_TRACE, windows_repl_plugin_name, + "<= windows_private_update_dirsync_control\n" ); #endif } @@ -1691,7 +1688,7 @@ windows_plugin_callonce(void) if (slapi_apib_get_interface_all(guid, &theapis) || (NULL == theapis)) { slapi_log_err(SLAPI_LOG_PLUGIN, windows_repl_plugin_name, - "<-- windows_plugin_callonce -- no more windows plugin APIs registered " + "<-- windows_plugin_callonce - No more windows plugin APIs registered " "for GUID [%s] -- end\n", guid); } else { @@ -1699,7 +1696,7 @@ windows_plugin_callonce(void) for (idx = 0; theapis && theapis[idx]; ++idx) { if (windows_plugin_add(theapis[idx], maxapi)) { slapi_log_err(SLAPI_LOG_PLUGIN, windows_repl_plugin_name, - "<-- windows_plugin_callonce -- already added windows plugin API " + "<-- windows_plugin_callonce - Already added windows plugin API " "[%d][0x%p] for GUID [%s] -- end\n", idx, theapis[idx], guid); } @@ -1756,11 +1753,11 @@ windows_plugin_init(Repl_Agmt *ra) struct winsync_plugin_cookie *list = NULL; void *cookie = NULL; - slapi_log_err(SLAPI_LOG_PLUGIN, windows_repl_plugin_name, "--> windows_plugin_init - begin\n"); + slapi_log_err(SLAPI_LOG_PLUGIN, windows_repl_plugin_name, "windows_plugin_init - Begin\n"); if (PR_CallOnce(&winsync_callOnce, windows_plugin_callonce)) { PRErrorCode prerr = PR_GetError(); - slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_plugin_init" + slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name, "windows_plugin_init - " "Cannot initialize plugin: %d:%s\n", prerr, slapi_pr_strerror(prerr)); return; @@ -1780,7 +1777,7 @@ windows_plugin_init(Repl_Agmt *ra) windows_private_set_api_cookie(ra, list); - slapi_log_err(SLAPI_LOG_PLUGIN, windows_repl_plugin_name, "<-- windows_plugin_init - end\n"); + slapi_log_err(SLAPI_LOG_PLUGIN, windows_repl_plugin_name, "<-- windows_plugin_init - End\n"); return; } diff --git a/ldap/servers/plugins/retrocl/retrocl.h b/ldap/servers/plugins/retrocl/retrocl.h index 958c476..6963d4b 100644 --- a/ldap/servers/plugins/retrocl/retrocl.h +++ b/ldap/servers/plugins/retrocl/retrocl.h @@ -21,7 +21,6 @@ #include "slapi-private.h" #include "slapi-plugin.h" -/* #include "portable.h" */ #include "ldif.h" #include "slap.h" diff --git a/ldap/servers/plugins/rootdn_access/rootdn_access.h b/ldap/servers/plugins/rootdn_access/rootdn_access.h index 37347d7..dbf1b50 100644 --- a/ldap/servers/plugins/rootdn_access/rootdn_access.h +++ b/ldap/servers/plugins/rootdn_access/rootdn_access.h @@ -15,6 +15,7 @@ * Root DN access control plug-in header file */ #include "slapi-plugin.h" +#include "slapi-private.h" #include #include #include diff --git a/ldap/servers/plugins/statechange/statechange.c b/ldap/servers/plugins/statechange/statechange.c index 64da26b..92fac71 100644 --- a/ldap/servers/plugins/statechange/statechange.c +++ b/ldap/servers/plugins/statechange/statechange.c @@ -17,6 +17,7 @@ #include #include "portable.h" #include "slapi-plugin.h" +#include "slapi-private.h" #include "statechange.h" #include diff --git a/ldap/servers/plugins/sync/sync.h b/ldap/servers/plugins/sync/sync.h index 7251f17..b4b16cc 100644 --- a/ldap/servers/plugins/sync/sync.h +++ b/ldap/servers/plugins/sync/sync.h @@ -17,6 +17,7 @@ #include #include #include "slapi-plugin.h" +#include "slapi-private.h" #define PLUGIN_NAME "content-sync-plugin" diff --git a/ldap/servers/plugins/uiduniq/7bit.c b/ldap/servers/plugins/uiduniq/7bit.c index 52f53da..53d7dac 100644 --- a/ldap/servers/plugins/uiduniq/7bit.c +++ b/ldap/servers/plugins/uiduniq/7bit.c @@ -21,10 +21,11 @@ */ #include #include +#include #include /* DBDB this should be pulled from a common header file */ -#if defined( LDAP_DEBUG ) && !defined( DEBUG ) +#if defined( LDAP_ERROR_LOGGING ) && !defined( DEBUG ) #define DEBUG #endif diff --git a/ldap/servers/plugins/uiduniq/plugin-utils.h b/ldap/servers/plugins/uiduniq/plugin-utils.h index bb046d8..7285902 100644 --- a/ldap/servers/plugins/uiduniq/plugin-utils.h +++ b/ldap/servers/plugins/uiduniq/plugin-utils.h @@ -42,8 +42,9 @@ #include "slapi-plugin-compat4.h" #include #include +#include -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING #ifndef DEBUG #define DEBUG #endif diff --git a/ldap/servers/plugins/uiduniq/uid.c b/ldap/servers/plugins/uiduniq/uid.c index 1b8cfa0..ae9320e 100644 --- a/ldap/servers/plugins/uiduniq/uid.c +++ b/ldap/servers/plugins/uiduniq/uid.c @@ -23,11 +23,12 @@ */ #include #include +#include #include #include "plugin-utils.h" #include "nspr.h" -#if defined( LDAP_DEBUG ) && !defined( DEBUG ) +#if defined( LDAP_ERROR_LOGGING ) && !defined( DEBUG ) #define DEBUG #endif diff --git a/ldap/servers/plugins/whoami/whoami.c b/ldap/servers/plugins/whoami/whoami.c index 0169701..68db850 100644 --- a/ldap/servers/plugins/whoami/whoami.c +++ b/ldap/servers/plugins/whoami/whoami.c @@ -17,6 +17,7 @@ #include #include #include "slapi-plugin.h" +#include "slapi-private.h" #define PLUGIN_NAME "whoami-plugin" #define PLUGIN_DESC "whoami extended operation plugin" diff --git a/ldap/servers/slapd/back-ldbm/filterindex.c b/ldap/servers/slapd/back-ldbm/filterindex.c index 8771b66..bde7e9e 100644 --- a/ldap/servers/slapd/back-ldbm/filterindex.c +++ b/ldap/servers/slapd/back-ldbm/filterindex.c @@ -207,7 +207,7 @@ ava_candidates( slapi_pblock_get(pb, SLAPI_PAGED_RESULTS_INDEX, &pr_idx); slapi_attr_init(&sattr, type); -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING if ( loglevel_is_set( LDAP_DEBUG_TRACE )) { char *op = NULL; char buf[BUFSIZ]; @@ -981,7 +981,7 @@ keys2idl( idl2 = index_read_ext_allids( pb, be, type, indextype, slapi_value_get_berval(ivals[i]), txn, err, unindexed, allidslimit ); -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING /* XXX if ( slapd_ldap_debug & LDAP_DEBUG_TRACE ) { XXX */ { char buf[BUFSIZ]; diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c index 155589f..d4de28c 100644 --- a/ldap/servers/slapd/back-ldbm/index.c +++ b/ldap/servers/slapd/back-ldbm/index.c @@ -1599,7 +1599,7 @@ index_range_read_ext( slapi_log_err(SLAPI_LOG_FILTER, "index_range_read_ext", "dbc->c_get(...DB_NEXT) == %i\n", *err); } -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING /* this is for debugging only */ if (idl != NULL) { if (ALLIDS(idl)) { @@ -1737,7 +1737,7 @@ addordel_values( */ key.flags = DB_DBT_USERMEM; key.ulen = tmpbuflen; -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING /* XXX if ( slapd_ldap_debug & LDAP_DEBUG_TRACE ) XXX */ { char encbuf[BUFSIZ]; @@ -1907,7 +1907,7 @@ addordel_values_sv( */ key.flags = DB_DBT_USERMEM; key.ulen = tmpbuflen; -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING /* XXX if ( slapd_ldap_debug & LDAP_DEBUG_TRACE ) XXX */ { char encbuf[BUFSIZ]; diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c index 895ba89..8c02d5d 100644 --- a/ldap/servers/slapd/daemon.c +++ b/ldap/servers/slapd/daemon.c @@ -1146,7 +1146,7 @@ void slapd_daemon( daemon_ports_t *ports ) tp_config.max_threads = maxthreads; tp_config.stacksize = 0; -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING tp_config.log_fct = nunc_stans_logging; #else tp_config.log_fct = NULL; @@ -1689,12 +1689,12 @@ handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll) time_t curtime = current_time(); int maxthreads = config_get_maxthreadsperconn(); -#if LDAP_DEBUG +#if LDAP_ERROR_LOGGING if ( slapd_ldap_debug & LDAP_DEBUG_CONNS ) { connection_table_dump_activity_to_errors_log(ct); } -#endif /* LDAP_DEBUG */ +#endif /* LDAP_ERROR_LOGGING */ /* diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c index 8e4a9c4..78f21d0 100644 --- a/ldap/servers/slapd/main.c +++ b/ldap/servers/slapd/main.c @@ -1449,7 +1449,7 @@ process_command_line(int argc, char **argv, char *myname, long_opts, &longopt_index)) != EOF ) { char *configdir = 0; switch ( i ) { -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING case 'd': /* turn on debugging */ if ( optarg_ext[0] == '?' || 0 == strcasecmp( optarg_ext, "help" )) { @@ -1468,7 +1468,7 @@ process_command_line(int argc, char **argv, char *myname, #else case 'd': /* turn on debugging */ fprintf( stderr, - "must compile with LDAP_DEBUG for debugging\n" ); + "must compile with LDAP_ERROR_LOGGING for debugging\n" ); break; #endif @@ -2726,7 +2726,7 @@ slapd_exemode_dbverify(void) } -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING /* * Table to associate a string with a debug level. */ @@ -2772,7 +2772,7 @@ static struct slapd_debug_level_entry { /* - * Given a string represention of a debug level, map it to a integer value + * Given a string representation of a debug level, map it to a integer value * and return that value. -1 is returned upon error, with a message * printed to stderr. */ @@ -2893,7 +2893,7 @@ slapd_debug_level_usage( void ) " -d 8+32\n" " -d 40\n" ); } -#endif /* LDAP_DEBUG */ +#endif /* LDAP_ERROR_LOGGING */ static int force_to_disable_security(const char *what, int *init_ssl, daemon_ports_t *ports_info) diff --git a/ldap/servers/slapd/modify.c b/ldap/servers/slapd/modify.c index 4bc1e2e..3aa4359 100644 --- a/ldap/servers/slapd/modify.c +++ b/ldap/servers/slapd/modify.c @@ -51,7 +51,7 @@ static int hash_rootpw (LDAPMod **mods); static int valuearray_init_bervalarray_unhashed_only(struct berval **bvals, Slapi_Value ***cvals); static void optimize_mods(Slapi_Mods *smods); -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING static const char* mod_op_image (int op) { @@ -358,7 +358,7 @@ do_modify( Slapi_PBlock *pb ) goto free_and_return; } -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING slapi_log_err(SLAPI_LOG_ARGS, "do_modify", "modifications:\n"); for (mod = slapi_mods_get_first_mod(&smods); mod != NULL; mod = slapi_mods_get_next_mod(&smods)) diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h index 11afeca..216da95 100644 --- a/ldap/servers/slapd/slapi-plugin.h +++ b/ldap/servers/slapd/slapi-plugin.h @@ -27,7 +27,6 @@ extern "C" { #endif -#include "portable.h" #include "prtypes.h" #include "ldap.h" #include "prprf.h" @@ -58,13 +57,6 @@ NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt, ...) ; #endif -/* Define our logging macros */ -#define slapi_log_err(level, subsystem, fmt, ...) -#ifdef LDAP_DEBUG -# undef slapi_log_err -# define slapi_log_err(level, subsystem, ...) slapi_log_error(level, subsystem, __VA_ARGS__) -#endif - /* NSPR uses the print macros a bit differently than ANSI C. We * need to use ll for a 64-bit integer, even when a long is 64-bit. */ diff --git a/ldap/servers/slapd/slapi-private.h b/ldap/servers/slapd/slapi-private.h index 50684da..a152d76 100644 --- a/ldap/servers/slapd/slapi-private.h +++ b/ldap/servers/slapd/slapi-private.h @@ -22,6 +22,7 @@ extern "C" { #include /* for time_t */ #include "nspr.h" +#include "portable.h" #include "slapi-plugin.h" /* * XXXmcs: we can stop including slapi-plugin-compat4.h once we stop using @@ -29,6 +30,13 @@ extern "C" { */ #include "slapi-plugin-compat4.h" +/* Define our internal logging macro */ +#define slapi_log_err(level, subsystem, fmt, ...) +#ifdef LDAP_ERROR_LOGGING +# undef slapi_log_err +# define slapi_log_err(level, subsystem, ...) slapi_log_error(level, subsystem, __VA_ARGS__) +#endif + /* * server shutdown status */ diff --git a/ldap/servers/slapd/tools/ldaptool.h b/ldap/servers/slapd/tools/ldaptool.h index 414e8cf..b2f094b 100644 --- a/ldap/servers/slapd/tools/ldaptool.h +++ b/ldap/servers/slapd/tools/ldaptool.h @@ -112,7 +112,7 @@ extern char *ldaptool_progname; extern FILE *ldaptool_fp; extern char *ldaptool_charset; extern LDAPControl *ldaptool_request_ctrls[]; -#ifdef LDAP_DEBUG +#ifdef LDAP_ERROR_LOGGING extern int ldaptool_dbg_lvl; #define LDAPToolDebug(lvl,fmt,arg1,arg2,arg3) if (lvl & ldaptool_dbg_lvl) { fprintf(stderr,fmt,arg1,arg2,arg3); } #else -- 2.7.4