mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
NT updates from jon@symas.com.
This commit is contained in:
parent
ff701c286b
commit
0552b1c53f
54 changed files with 911 additions and 595 deletions
|
|
@ -7,44 +7,47 @@
|
||||||
## Makefile Template for Shared Libraries
|
## Makefile Template for Shared Libraries
|
||||||
##
|
##
|
||||||
|
|
||||||
NT_LTFLAGS = --only-$(LINKAGE)
|
|
||||||
LTFLAGS = $(@PLAT@_LTFLAGS)
|
|
||||||
|
|
||||||
NT_DYN_LT_NO_UNDEF = -no-undefined
|
|
||||||
LT_NO_UNDEF = $(@PLAT@_@LIB_LINKAGE@_LT_NO_UNDEF)
|
|
||||||
|
|
||||||
COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(EXTRA_DEFS) -c
|
|
||||||
LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -rpath $(libdir) \
|
|
||||||
$(CFLAGS) $(LDFLAGS) $(LTVERSION) $(LT_NO_UNDEF)
|
|
||||||
|
|
||||||
MKDEPFLAG = -l
|
MKDEPFLAG = -l
|
||||||
|
|
||||||
.SUFFIXES: .c .o .lo
|
.SUFFIXES: .c .o .lo
|
||||||
|
|
||||||
.c.lo:
|
.c.lo:
|
||||||
$(COMPILE) $<
|
$(LTCOMPILE_LIB) $<
|
||||||
|
|
||||||
|
#
|
||||||
# DYN_EXT (@DYN_EXT@) describes the extension assoicated with a
|
# symlinks for libraries: UNIX and Windows (a.k.a. NT) need to be handled
|
||||||
# dynamic library, e.g. so, dll
|
# differently. In UNIX, the static and shared libraries, as well as shared
|
||||||
|
# library symlinks, can all be symlinked in the 'libraries' directory. In
|
||||||
DYN_EXT=@DYN_EXT@
|
# Windows, only the static library (.a file) or the shared library (.dll)
|
||||||
|
# file should be present. The current mingw linker (i.e. ld) WILL look
|
||||||
$(LIBRARY): version.lo
|
# for a .dll file at link time and internally generate an import library
|
||||||
$(LTLIBLINK) -o $@ $(OBJS) version.lo $(EXTRA_LIBS)
|
# for it. However, ld will not do this if a static library is present.
|
||||||
$(RM) ../$@
|
# That doesn't seem very correct, but that's the behavior, like it or not.
|
||||||
d=`$(PWD)`; d=`$(BASENAME) $$d`; cd ..; $(LN_S) $$d/$@ $@; \
|
#
|
||||||
t=`$(BASENAME) $@ .la`.a; $(RM) $$t; $(LN_S) $$d/.libs/$$t $$t
|
# Note that there doesn't seem to be a true need for the .la file at
|
||||||
if test "$(LINK_BINS_DYNAMIC)" = "yes"; then \
|
# this level, so it is left out.
|
||||||
d=`$(PWD)`; d=`$(BASENAME) $$d`; b=`$(BASENAME) $@ .la`; \
|
#
|
||||||
cd .libs; t=`echo $$b*.$(DYN_EXT)`; (cd ../.. ; $(RM) $$t; \
|
# The set of symlinks are determined by examining the library's .la file.
|
||||||
$(LN_S) $$d/.libs/$$t $$t); \
|
#
|
||||||
if test "$(DYN_EXT)" != dll; then \
|
$(LIBRARY): version.lo
|
||||||
t=`echo $$b.$(DYN_EXT).?`; cd ../.. ; \
|
$(LTLINK_LIB) -o $@ $(OBJS) version.lo $(LINK_LIBS)
|
||||||
$(RM) $$t; \
|
@d=`$(PWD)`; b=`$(BASENAME) $$d`; \
|
||||||
$(LN_S) $$d/.libs/$$t $$t; \
|
echo cd ..; \
|
||||||
fi \
|
cd ..; \
|
||||||
fi
|
arlib=`grep '^old_library=' $$b/$@`; \
|
||||||
|
arlib=`expr "$$arlib" : "[^']*'\(.*\)'"`; \
|
||||||
|
libs=$$arlib; \
|
||||||
|
if test "$(BUILD_LIBS_DYNAMIC)" = "shared"; then \
|
||||||
|
shlibs=`grep '^library_names' $$b/$@`; \
|
||||||
|
shlibs=`expr "$$shlibs" : "[^']*'\(.*\)'"`; \
|
||||||
|
libs="$$libs $$shlibs"; \
|
||||||
|
fi; \
|
||||||
|
for i in $$libs; do \
|
||||||
|
echo $(RM) $$i; \
|
||||||
|
$(RM) $$i; \
|
||||||
|
echo $(LN_S) $$b/.libs/$$i $$i; \
|
||||||
|
$(LN_S) $$b/.libs/$$i $$i; \
|
||||||
|
done
|
||||||
|
|
||||||
Makefile: $(top_srcdir)/build/lib-shared.mk
|
Makefile: $(top_srcdir)/build/lib-shared.mk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,17 @@ lint: lint-local FORCE
|
||||||
lint5: lint5-local FORCE
|
lint5: lint5-local FORCE
|
||||||
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
|
$(5LINT) $(DEFS) $(DEFINES) $(SRCS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# In the mingw/cygwin environment, the so and dll files must be
|
||||||
|
# deleted separately, instead of using the {.so*,*.dll} construct
|
||||||
|
# that was previously used. It just didn't work.
|
||||||
|
#
|
||||||
clean-common: FORCE
|
clean-common: FORCE
|
||||||
$(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
|
$(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
|
||||||
$(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
|
$(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
|
||||||
*.o *.lo a.out *.exe core version.c .libs/* \
|
*.o *.lo a.out *.exe core version.c .libs/* \
|
||||||
../`$(BASENAME) $(LIBRARY) .la`{.a,.so*,*.dll}
|
../`$(BASENAME) $(LIBRARY) .la`.so* \
|
||||||
|
../`$(BASENAME) $(LIBRARY) .la`*.dll
|
||||||
|
|
||||||
depend-common: FORCE
|
depend-common: FORCE
|
||||||
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)
|
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)
|
||||||
|
|
@ -34,3 +40,4 @@ lint-local: FORCE
|
||||||
lint5-local: FORCE
|
lint5-local: FORCE
|
||||||
|
|
||||||
Makefile: $(top_srcdir)/build/lib.mk
|
Makefile: $(top_srcdir)/build/lib.mk
|
||||||
|
|
||||||
|
|
|
||||||
13
build/mod.mk
13
build/mod.mk
|
|
@ -10,18 +10,12 @@
|
||||||
LIBRARY = $(LIBBASE).la
|
LIBRARY = $(LIBBASE).la
|
||||||
LIBSTAT = lib$(LIBBASE).a
|
LIBSTAT = lib$(LIBBASE).a
|
||||||
|
|
||||||
LTFLAGS = --only-$(LINKAGE)
|
|
||||||
|
|
||||||
COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(MODDEFS) -c
|
|
||||||
LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -rpath $(moduledir) \
|
|
||||||
$(CFLAGS) $(LDFLAGS) $(LTVERSION) $(LT_NO_UNDEF)
|
|
||||||
|
|
||||||
MKDEPFLAG = -l
|
MKDEPFLAG = -l
|
||||||
|
|
||||||
.SUFFIXES: .c .o .lo
|
.SUFFIXES: .c .o .lo
|
||||||
|
|
||||||
.c.lo:
|
.c.lo:
|
||||||
$(COMPILE) $<
|
$(LTCOMPILE_MOD) $<
|
||||||
|
|
||||||
all-no lint-no 5lint-no depend-no install-no: FORCE
|
all-no lint-no 5lint-no depend-no install-no: FORCE
|
||||||
@echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
|
@echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
|
||||||
|
|
@ -32,9 +26,8 @@ version.c: $(OBJS)
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
$(MKVERSION) $(LIBBASE) > $@
|
$(MKVERSION) $(LIBBASE) > $@
|
||||||
|
|
||||||
$(LIBRARY): $(MODDEPS) version.lo
|
$(LIBRARY): version.lo
|
||||||
$(LTLIBLINK) -module -o $@ $(OBJS) version.lo \
|
$(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS)
|
||||||
$(MODLIBS)
|
|
||||||
|
|
||||||
$(LIBSTAT): version.lo
|
$(LIBSTAT): version.lo
|
||||||
$(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
|
$(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
|
||||||
|
|
|
||||||
|
|
@ -774,6 +774,7 @@ AC_DEFUN([OL_NT_THREADS], [
|
||||||
|
|
||||||
if test $ac_cv_func__beginthread = yes ; then
|
if test $ac_cv_func__beginthread = yes ; then
|
||||||
AC_DEFINE(HAVE_NT_THREADS,1,[if you have NT Threads])
|
AC_DEFINE(HAVE_NT_THREADS,1,[if you have NT Threads])
|
||||||
|
ol_cv_nt_threads=yes
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
dnl ====================================================================
|
dnl ====================================================================
|
||||||
|
|
|
||||||
53
build/top.mk
53
build/top.mk
|
|
@ -37,9 +37,12 @@ sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@$(ldap_subdir)
|
sysconfdir = @sysconfdir@$(ldap_subdir)
|
||||||
schemadir = $(sysconfdir)/schema
|
schemadir = $(sysconfdir)/schema
|
||||||
|
|
||||||
|
PLAT = @PLAT@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
|
|
||||||
|
BUILD_LIBS_DYNAMIC = @BUILD_LIBS_DYNAMIC@
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
|
@ -58,11 +61,47 @@ MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)"
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBVERSION = @OPENLDAP_LIBVERSION@
|
LIBVERSION = @OPENLDAP_LIBVERSION@
|
||||||
LTVERSION = -version-info $(LIBVERSION)
|
LTVERSION = -version-info $(LIBVERSION)
|
||||||
#We don't use our own shared libraries (yet)
|
|
||||||
#LTLINK = $(LIBTOOL) --mode=link $(CC) -rpath $(libdir) \
|
# libtool --only flag for libraries: platform specific
|
||||||
# $(CFLAGS) $(LDFLAGS)
|
NT_LTONLY_LIB = --only-$(BUILD_LIBS_DYNAMIC)
|
||||||
LTLINK = $(LIBTOOL) --mode=link $(CC) \
|
LTONLY_LIB = $(@PLAT@_LTONLY_LIB)
|
||||||
$(CFLAGS) $(LDFLAGS)
|
|
||||||
|
# libtool --only flag for modules: depends on linkage of module
|
||||||
|
# The BUILD_MOD_DYNAMIC macro is defined in each backend Makefile.in file
|
||||||
|
LTONLY_MOD = --only-$(BUILD_MOD_DYNAMIC)
|
||||||
|
|
||||||
|
# platform-specific libtool flags
|
||||||
|
NT_LTFLAGS_LIB = -no-undefined -avoid-version -rpath $(libdir)
|
||||||
|
NT_LTFLAGS_MOD = -no-undefined -avoid-version -rpath $(moduledir)
|
||||||
|
UNIX_LTFLAGS_LIB = $(LTVERSION) -rpath $(libdir)
|
||||||
|
UNIX_LTFLAGS_MOD = $(LTVERSION) -rpath $(moduledir)
|
||||||
|
|
||||||
|
# libtool flags
|
||||||
|
LTFLAGS = $(@PLAT@_LTFLAGS)
|
||||||
|
LTFLAGS_LIB = $(@PLAT@_LTFLAGS_LIB)
|
||||||
|
LTFLAGS_MOD = $(@PLAT@_LTFLAGS_MOD)
|
||||||
|
|
||||||
|
# LIB_DEFS defined in liblber and libldap Makefile.in files.
|
||||||
|
# MOD_DEFS defined in backend Makefile.in files.
|
||||||
|
|
||||||
|
# platform-specific LINK_LIBS defined in various Makefile.in files.
|
||||||
|
# LINK_LIBS referenced in library and module link commands.
|
||||||
|
LINK_LIBS = $(@PLAT@_LINK_LIBS)
|
||||||
|
|
||||||
|
LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LTFLAGS)
|
||||||
|
|
||||||
|
LTCOMPILE_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=compile \
|
||||||
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(LIB_DEFS) -c
|
||||||
|
|
||||||
|
LTLINK_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=link \
|
||||||
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB)
|
||||||
|
|
||||||
|
LTCOMPILE_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \
|
||||||
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(MOD_DEFS) -c
|
||||||
|
|
||||||
|
LTLINK_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=link \
|
||||||
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LTFLAGS_MOD)
|
||||||
|
|
||||||
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
|
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
|
||||||
|
|
||||||
# Misc UNIX commands used in build environment
|
# Misc UNIX commands used in build environment
|
||||||
|
|
@ -140,7 +179,6 @@ MODULES_LDFLAGS = @SLAPD_MODULES_LDFLAGS@
|
||||||
MODULES_LIBS = @MODULES_LIBS@
|
MODULES_LIBS = @MODULES_LIBS@
|
||||||
TERMCAP_LIBS = @TERMCAP_LIBS@
|
TERMCAP_LIBS = @TERMCAP_LIBS@
|
||||||
SLAPD_PERL_LDFLAGS = @SLAPD_PERL_LDFLAGS@
|
SLAPD_PERL_LDFLAGS = @SLAPD_PERL_LDFLAGS@
|
||||||
LINK_BINS_DYNAMIC = @LINK_BINS_DYNAMIC@
|
|
||||||
|
|
||||||
SLAPD_SQL_LDFLAGS = @SLAPD_SQL_LDFLAGS@
|
SLAPD_SQL_LDFLAGS = @SLAPD_SQL_LDFLAGS@
|
||||||
SLAPD_SQL_INCLUDES = @SLAPD_SQL_INCLUDES@
|
SLAPD_SQL_INCLUDES = @SLAPD_SQL_INCLUDES@
|
||||||
|
|
@ -152,7 +190,8 @@ SLURPD_LIBS = @SLURPD_LIBS@
|
||||||
# Our Defaults
|
# Our Defaults
|
||||||
CC = $(AC_CC)
|
CC = $(AC_CC)
|
||||||
DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
|
DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
|
||||||
CFLAGS = $(AC_CFLAGS) $(DEFS)
|
CFLAGS = $(AC_CFLAGS)
|
||||||
|
CPPFLAGS = $(DEFS)
|
||||||
LDFLAGS = $(LDAP_LIBPATH) $(AC_LDFLAGS) $(XLDFLAGS)
|
LDFLAGS = $(LDAP_LIBPATH) $(AC_LDFLAGS) $(XLDFLAGS)
|
||||||
LIBS = $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS)
|
LIBS = $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
##
|
##
|
||||||
## Clients Makefile.in for OpenLDAP
|
## Clients Makefile.in for OpenLDAP
|
||||||
|
|
||||||
SUBDIRS= tools ud
|
SUBDIRS = tools ud
|
||||||
|
CLEANDIRS = finger mail500 maildap
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ OBJS = ldapsearch.o ldapmodify.o ldapdelete.o ldapmodrdn.o ldappasswd.o
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
|
|
||||||
|
|
||||||
XLIBS = -llutil -lldif -lldap -llber
|
XLIBS = -llutil -lldif -lldap -llber
|
||||||
XXLIBS = $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
|
XXLIBS = $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,15 @@ XSRCS= version.c
|
||||||
OBJS= main.o find.o mod.o print.o auth.o util.o help.o \
|
OBJS= main.o find.o mod.o print.o auth.o util.o help.o \
|
||||||
group.o globals.o edit.o
|
group.o globals.o edit.o
|
||||||
HDRS= ud.h
|
HDRS= ud.h
|
||||||
PROGRAMS= ud
|
|
||||||
|
UNIX_PRGS = ud
|
||||||
|
PROGRAMS = $(@PLAT@_PRGS)
|
||||||
|
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
|
|
||||||
|
|
||||||
XLIBS = -llutil -lldif -lldap -llber
|
XLIBS = -llutil -lldif -lldap -llber
|
||||||
XXLIBS = $(TERMCAP_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
|
XXLIBS = $(TERMCAP_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
|
||||||
|
|
||||||
ud : version.o
|
ud : version.o
|
||||||
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
|
$(LTLINK) -o $@ version.o $(OBJS) $(LIBS)
|
||||||
|
|
|
||||||
75
configure.in
75
configure.in
|
|
@ -788,6 +788,7 @@ AC_CHECK_HEADERS( \
|
||||||
termios.h \
|
termios.h \
|
||||||
unistd.h \
|
unistd.h \
|
||||||
winsock.h \
|
winsock.h \
|
||||||
|
winsock2.h \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -799,24 +800,43 @@ AC_CHECK_FUNC(dlopen, :, [AC_CHECK_LIB(dl, dlopen)])
|
||||||
dnl HP-UX requires -lV3
|
dnl HP-UX requires -lV3
|
||||||
AC_CHECK_LIB(V3, sigset)
|
AC_CHECK_LIB(V3, sigset)
|
||||||
|
|
||||||
dnl Gotta check for winsock manually
|
dnl The following is INTENTIONALLY scripted out because shell does not
|
||||||
if test $ac_cv_header_winsock_h = yes; then
|
dnl support variable names with the '@' character, which is what
|
||||||
AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
|
dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
|
||||||
AC_TRY_LINK([#include <winsock.h>],[
|
AC_MSG_CHECKING(for winsock)
|
||||||
socket(0,0,0);
|
save_LIBS="$LIBS"
|
||||||
select(0,NULL,NULL,NULL,NULL);
|
for curlib in ws2_32 wsock32; do
|
||||||
closesocket(0);
|
LIBS="$LIBS -l$curlib"
|
||||||
gethostname(NULL,0);
|
AC_TRY_LINK([
|
||||||
],[ol_cv_winsock=yes],[ol_cv_winsock=no]))
|
char socket@12();
|
||||||
|
char select@20();
|
||||||
|
char closesocket@4();
|
||||||
|
char gethostname@8();
|
||||||
|
],
|
||||||
|
[
|
||||||
|
socket@12();
|
||||||
|
select@20();
|
||||||
|
closesocket@4();
|
||||||
|
gethostname@8();
|
||||||
|
],
|
||||||
|
have_winsock=yes, have_winsock=no)
|
||||||
|
|
||||||
if test $ol_cv_winsock = yes ; then
|
if test $have_winsock = yes; then
|
||||||
AC_DEFINE(HAVE_WINSOCK,1,[define if you have winsock])
|
AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
|
||||||
ac_cv_func_socket=yes
|
ac_cv_func_socket=yes
|
||||||
ac_cv_func_select=yes
|
ac_cv_func_select=yes
|
||||||
ac_cv_func_closesocket=yes
|
ac_cv_func_closesocket=yes
|
||||||
ac_cv_func_gethostname=yes
|
ac_cv_func_gethostname=yes
|
||||||
|
if test $curlib = ws2_32; then
|
||||||
|
have_winsock=winsock2
|
||||||
|
AC_DEFINE(HAVE_WINSOCK2, 1,
|
||||||
|
[define if you have winsock2])
|
||||||
|
fi
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
LIBS="$save_LIBS"
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT($have_winsock)
|
||||||
|
|
||||||
dnl Find socket()
|
dnl Find socket()
|
||||||
dnl Likely combinations:
|
dnl Likely combinations:
|
||||||
|
|
@ -852,7 +872,8 @@ AC_CHECK_HEADERS( regex.h )
|
||||||
if test "$ac_cv_header_regex_h" != yes ; then
|
if test "$ac_cv_header_regex_h" != yes ; then
|
||||||
AC_MSG_ERROR([POSIX regex.h required.])
|
AC_MSG_ERROR([POSIX regex.h required.])
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNC(regfree, :, AC_MSG_ERROR([POSIX regex required.]))
|
AC_SEARCH_LIBS(regfree, [regex gnuregex],
|
||||||
|
:, AC_MSG_ERROR([POSIX regex required.]))
|
||||||
|
|
||||||
OL_POSIX_REGEX
|
OL_POSIX_REGEX
|
||||||
if test "$ol_cv_c_posix_regex" = no ; then
|
if test "$ol_cv_c_posix_regex" = no ; then
|
||||||
|
|
@ -1898,9 +1919,10 @@ fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
|
if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
|
||||||
LINK_BINS_DYNAMIC="yes"
|
BUILD_LIBS_DYNAMIC=shared
|
||||||
|
AC_DEFINE(LDAP_LIBS_DYNAMIC, 1, [define if LDAP libs are dynamic])
|
||||||
else
|
else
|
||||||
LINK_BINS_DYNAMIC="no"
|
BUILD_LIBS_DYNAMIC=static
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
|
@ -2074,7 +2096,7 @@ fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl Check for entropy sources
|
dnl Check for entropy sources
|
||||||
if test $cross_compiling != yes ; then
|
if test $cross_compiling != yes -a $ac_cv_mingw32 != yes ; then
|
||||||
dev=no
|
dev=no
|
||||||
if test -r /dev/urandom ; then
|
if test -r /dev/urandom ; then
|
||||||
dev="/dev/urandom";
|
dev="/dev/urandom";
|
||||||
|
|
@ -2559,28 +2581,22 @@ fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
|
||||||
if test "$LINK_BINS_DYNAMIC" = yes; then
|
dnl
|
||||||
LIB_LINKAGE=DYN
|
dnl For Windows build, we don't want to include -dlopen flags.
|
||||||
LT_LIB_LINKAGE=shared
|
dnl They hurt more than they help.
|
||||||
else
|
dnl
|
||||||
LIB_LINKAGE=STAT
|
|
||||||
LT_LIB_LINKAGE=static
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$ac_cv_mingw32" = yes ; then
|
if test "$ac_cv_mingw32" = yes ; then
|
||||||
PLAT=NT
|
PLAT=NT
|
||||||
DYN_EXT=dll
|
SLAPD_MODULES_LDFLAGS=
|
||||||
|
SLAPD_MODULES_LIST=
|
||||||
else
|
else
|
||||||
PLAT=UNIX
|
PLAT=UNIX
|
||||||
DYN_EXT=so
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(LIBSRCS)
|
AC_SUBST(LIBSRCS)
|
||||||
|
|
||||||
AC_SUBST(PLAT)
|
AC_SUBST(PLAT)
|
||||||
AC_SUBST(LIB_LINKAGE)
|
AC_SUBST(BUILD_LIBS_DYNAMIC)
|
||||||
AC_SUBST(LT_LIB_LINKAGE)
|
|
||||||
AC_SUBST(DYN_EXT)
|
|
||||||
|
|
||||||
AC_SUBST(BUILD_SLAPD)
|
AC_SUBST(BUILD_SLAPD)
|
||||||
AC_SUBST(BUILD_BDB)
|
AC_SUBST(BUILD_BDB)
|
||||||
|
|
@ -2618,7 +2634,6 @@ AC_SUBST(LTHREAD_LIBS)
|
||||||
AC_SUBST(LUTIL_LIBS)
|
AC_SUBST(LUTIL_LIBS)
|
||||||
AC_SUBST(WRAP_LIBS)
|
AC_SUBST(WRAP_LIBS)
|
||||||
AC_SUBST(MOD_TCL_LIB)
|
AC_SUBST(MOD_TCL_LIB)
|
||||||
AC_SUBST(LINK_BINS_DYNAMIC)
|
|
||||||
|
|
||||||
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
|
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
|
||||||
AC_SUBST(SLAPD_MODULES_LDFLAGS)
|
AC_SUBST(SLAPD_MODULES_LDFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -31,16 +31,46 @@ ldap_config.h: $(LDAP_CONFIG) Makefile
|
||||||
@$(RM) $@
|
@$(RM) $@
|
||||||
@echo "Making $@"
|
@echo "Making $@"
|
||||||
@echo "/* Generated from $(LDAP_CONFIG) on `date` */" > $@; \
|
@echo "/* Generated from $(LDAP_CONFIG) on `date` */" > $@; \
|
||||||
|
if test $(PLAT) = NT; then \
|
||||||
|
sysconfdir=`cygpath -w $(sysconfdir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
datadir=`cygpath -w $(datadir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
bindir=`cygpath -w $(bindir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
sbindir=`cygpath -w $(sbindir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
libexecdir=`cygpath -w $(libexecdir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
localstatedir=`cygpath -w $(localstatedir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
editor=`cygpath -w $(EDITOR) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
finger=`cygpath -w $(FINGER) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
sendmail=`cygpath -w $(SENDMAIL) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
|
||||||
|
else \
|
||||||
|
sysconfdir=$(sysconfdir); \
|
||||||
|
datadir=$(datadir); \
|
||||||
|
bindir=$(bindir); \
|
||||||
|
sbindir=$(sbindir); \
|
||||||
|
libexecdir=$(libexecdir); \
|
||||||
|
localstatedir=$(localstatedir); \
|
||||||
|
editor=$(EDITOR); \
|
||||||
|
finger=$(FINGER); \
|
||||||
|
sendmail=$(SENDMAIL); \
|
||||||
|
fi; \
|
||||||
$(SED) \
|
$(SED) \
|
||||||
-e 's;%SYSCONFDIR%;$(sysconfdir);' \
|
-e "s;%SYSCONFDIR%;$$sysconfdir;" \
|
||||||
-e 's;%DATADIR%;$(datadir);' \
|
-e "s;%DATADIR%;$$datadir;" \
|
||||||
-e 's;%BINDIR%;$(bindir);' \
|
-e "s;%BINDIR%;$$bindir;" \
|
||||||
-e 's;%SBINDIR%;$(sbindir);' \
|
-e "s;%SBINDIR%;$$sbindir;" \
|
||||||
-e 's;%LIBEXECDIR%;$(libexecdir);' \
|
-e "s;%LIBEXECDIR%;$$libexecdir;" \
|
||||||
-e 's;%RUNDIR%;$(localstatedir);' \
|
-e "s;%RUNDIR%;$$localstatedir;" \
|
||||||
-e 's;%EDITOR%;$(EDITOR);' \
|
-e "s;%EDITOR%;$$editor;" \
|
||||||
-e 's;%FINGER%;$(FINGER);' \
|
-e "s;%FINGER%;$$finger;" \
|
||||||
-e 's;%SENDMAIL%;$(SENDMAIL);' \
|
-e "s;%SENDMAIL%;$$sendmail;" \
|
||||||
$(LDAP_CONFIG) >> $@; \
|
$(LDAP_CONFIG) >> $@; \
|
||||||
$(CHMOD) 444 $@
|
$(CHMOD) 444 $@
|
||||||
|
|
||||||
|
|
@ -49,3 +79,4 @@ install-common: all-common install-local
|
||||||
clean-common: clean-local
|
clean-common: clean-local
|
||||||
veryclean-common: veryclean-local
|
veryclean-common: veryclean-local
|
||||||
depend-common: depend-local
|
depend-common: depend-local
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,9 @@ LDAP_F(char *) ldap_pvt_strtok LDAP_P(( char *str,
|
||||||
/* strdup() is missing, declare our own version */
|
/* strdup() is missing, declare our own version */
|
||||||
# undef strdup
|
# undef strdup
|
||||||
# define strdup(s) ber_strdup(s)
|
# define strdup(s) ber_strdup(s)
|
||||||
#else
|
#elif !defined(_WIN32)
|
||||||
/* some systems fail to declare strdup */
|
/* some systems fail to declare strdup */
|
||||||
|
/* Windows does not require this declaration */
|
||||||
LDAP_LIBC_F(char *) (strdup)();
|
LDAP_LIBC_F(char *) (strdup)();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -498,12 +498,12 @@ ber_sockbuf_ctrl LDAP_P((
|
||||||
int opt,
|
int opt,
|
||||||
void *arg ));
|
void *arg ));
|
||||||
|
|
||||||
LBER_F( Sockbuf_IO ) ber_sockbuf_io_tcp;
|
LBER_V( Sockbuf_IO ) ber_sockbuf_io_tcp;
|
||||||
LBER_F( Sockbuf_IO ) ber_sockbuf_io_readahead;
|
LBER_V( Sockbuf_IO ) ber_sockbuf_io_readahead;
|
||||||
LBER_F( Sockbuf_IO ) ber_sockbuf_io_fd;
|
LBER_V( Sockbuf_IO ) ber_sockbuf_io_fd;
|
||||||
LBER_F( Sockbuf_IO ) ber_sockbuf_io_debug;
|
LBER_V( Sockbuf_IO ) ber_sockbuf_io_debug;
|
||||||
#ifdef LDAP_CONNECTIONLESS
|
#ifdef LDAP_CONNECTIONLESS
|
||||||
LBER_F( Sockbuf_IO ) ber_sockbuf_io_udp;
|
LBER_V( Sockbuf_IO ) ber_sockbuf_io_udp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ typedef struct sockbuf_buf {
|
||||||
/*
|
/*
|
||||||
* bprint.c
|
* bprint.c
|
||||||
*/
|
*/
|
||||||
LBER_F( BER_LOG_PRINT_FN ) ber_pvt_log_print;
|
LBER_V( BER_LOG_PRINT_FN ) ber_pvt_log_print;
|
||||||
|
|
||||||
LBER_F( int )
|
LBER_F( int )
|
||||||
ber_pvt_log_printf LDAP_P((
|
ber_pvt_log_printf LDAP_P((
|
||||||
|
|
|
||||||
|
|
@ -55,34 +55,177 @@
|
||||||
# define LDAP_GCCATTR(attrs)
|
# define LDAP_GCCATTR(attrs)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
/* Support for NT dynamic libraries. */
|
* Support for Windows DLLs.
|
||||||
|
*
|
||||||
|
* When external source code includes header files for dynamic libraries,
|
||||||
|
* the external source code is "importing" DLL symbols into its resulting
|
||||||
|
* object code. On Windows, symbols imported from DLLs must be explicitly
|
||||||
|
* indicated in header files with the __declspec(dllimport) directive.
|
||||||
|
* This is not totally necessary for functions because the compiler
|
||||||
|
* (gcc or MSVC) will generate stubs when this directive is absent.
|
||||||
|
* However, this is required for imported variables.
|
||||||
|
*
|
||||||
|
* The LDAP libraries, i.e. liblber and libldap, can be built as
|
||||||
|
* static or shared, based on configuration. Just about all other source
|
||||||
|
* code in OpenLDAP use these libraries. If the LDAP libraries
|
||||||
|
* are configured as shared, 'configure' defines the LDAP_LIBS_DYNAMIC
|
||||||
|
* macro. When other source files include LDAP library headers, the
|
||||||
|
* LDAP library symbols will automatically be marked as imported. When
|
||||||
|
* the actual LDAP libraries are being built, the symbols will not
|
||||||
|
* be marked as imported because the LBER_LIBRARY or LDAP_LIBRARY macros
|
||||||
|
* will be respectively defined.
|
||||||
|
*
|
||||||
|
* Any project outside of OpenLDAP with source code wanting to use
|
||||||
|
* LDAP dynamic libraries should explicitly define LDAP_LIBS_DYNAMIC.
|
||||||
|
* This will ensure that external source code appropriately marks symbols
|
||||||
|
* that will be imported.
|
||||||
|
*
|
||||||
|
* The slapd executable, itself, can be used as a dynamic library.
|
||||||
|
* For example, if a backend module is compiled as shared, it will
|
||||||
|
* import symbols from slapd. When this happens, the slapd symbols
|
||||||
|
* must be marked as imported in header files that the backend module
|
||||||
|
* includes. Remember that slapd links with various static libraries.
|
||||||
|
* If the LDAP libraries were configured as static, their object
|
||||||
|
* code is also part of the monolithic slapd executable. Thus, when
|
||||||
|
* a backend module imports symbols from slapd, it imports symbols from
|
||||||
|
* all of the static libraries in slapd as well. Thus, the SLAP_IMPORT
|
||||||
|
* macro, when defined, will appropriately mark symbols as imported.
|
||||||
|
* This macro should be used by shared backend modules as well as any
|
||||||
|
* other external source code that imports symbols from the slapd
|
||||||
|
* executable as if it were a DLL.
|
||||||
|
*
|
||||||
|
* Note that we don't actually have to worry about using the
|
||||||
|
* __declspec(dllexport) directive anywhere. This is because both
|
||||||
|
* MSVC and Mingw provide alternate (more effective) methods for exporting
|
||||||
|
* symbols out of binaries, i.e. the use of a DEF file.
|
||||||
|
*
|
||||||
|
* NOTE ABOUT BACKENDS: Backends can be configured as static or dynamic.
|
||||||
|
* When a backend is configured as dynamic, slapd will load the backend
|
||||||
|
* explicitly and populate function pointer structures by calling
|
||||||
|
* the backend's well-known initialization function. Because of this
|
||||||
|
* procedure, slapd never implicitly imports symbols from dynamic backends.
|
||||||
|
* This makes it unnecessary to tag various backend functions with the
|
||||||
|
* __declspec(dllimport) directive. This is because neither slapd nor
|
||||||
|
* any other external binary should ever be implicitly loading a backend
|
||||||
|
* dynamic module.
|
||||||
|
*
|
||||||
|
* Backends are supposed to be self-contained. However, it appears that
|
||||||
|
* back-meta DOES implicitly import symbols from back-ldap. This means
|
||||||
|
* that the __declspec(dllimport) directive should be marked on back-ldap
|
||||||
|
* functions (in its header files) if and only if we're compiling for
|
||||||
|
* windows AND back-ldap has been configured as dynamic AND back-meta
|
||||||
|
* is the client of back-ldap. When client is slapd, there is no effect
|
||||||
|
* since slapd does not implicitly import symbols.
|
||||||
|
*
|
||||||
|
* TODO(?): Currently, back-meta nor back-ldap is supported for Mingw32.
|
||||||
|
* Thus, there's no need to worry about this right now. This is something that
|
||||||
|
* may or may not have to be addressed in the future.
|
||||||
|
*/
|
||||||
|
|
||||||
/* LBER library */
|
/* LBER library */
|
||||||
#if defined(LBER_DECL) && defined(_WIN32)
|
#if defined(_WIN32) && \
|
||||||
# define LBER_F(type) extern __declspec(LBER_DECL) type
|
((defined(LDAP_LIBS_DYNAMIC) && !defined(LBER_LIBRARY)) || \
|
||||||
# define LBER_V(type) extern __declspec(LBER_DECL) type
|
(!defined(LDAP_LIBS_DYNAMIC) && defined(SLAPD_IMPORT)))
|
||||||
|
# define LBER_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LBER_V(type) extern __declspec(dllimport) type
|
||||||
#else
|
#else
|
||||||
# define LBER_F(type) extern type
|
# define LBER_F(type) extern type
|
||||||
# define LBER_V(type) extern type
|
# define LBER_V(type) extern type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* LDAP library */
|
/* LDAP library */
|
||||||
#if defined(LDAP_DECL) && defined(_WIN32)
|
#if defined(_WIN32) && \
|
||||||
# define LDAP_F(type) extern __declspec(LDAP_DECL) type
|
((defined(LDAP_LIBS_DYNAMIC) && !defined(LDAP_LIBRARY)) || \
|
||||||
# define LDAP_V(type) extern __declspec(LDAP_DECL) type
|
(!defined(LDAP_LIBS_DYNAMIC) && defined(SLAPD_IMPORT)))
|
||||||
|
# define LDAP_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_V(type) extern __declspec(dllimport) type
|
||||||
#else
|
#else
|
||||||
# define LDAP_F(type) extern type
|
# define LDAP_F(type) extern type
|
||||||
# define LDAP_V(type) extern type
|
# define LDAP_V(type) extern type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* AVL library */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_AVL_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_AVL_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_AVL_F(type) extern type
|
||||||
|
# define LDAP_AVL_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* LDBM library */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_LDBM_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_LDBM_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_LDBM_F(type) extern type
|
||||||
|
# define LDAP_LDBM_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* LDIF library */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_LDIF_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_LDIF_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_LDIF_F(type) extern type
|
||||||
|
# define LDAP_LDIF_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* LUNICODE library */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_LUNICODE_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_LUNICODE_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_LUNICODE_F(type) extern type
|
||||||
|
# define LDAP_LUNICODE_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* LUTIL library */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_LUTIL_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_LUTIL_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_LUTIL_F(type) extern type
|
||||||
|
# define LDAP_LUTIL_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* REWRITE library */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_REWRITE_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_REWRITE_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_REWRITE_F(type) extern type
|
||||||
|
# define LDAP_REWRITE_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* SLAPD (as a dynamic library exporting symbols) */
|
||||||
|
#if defined(_WIN32) && defined(SLAPD_IMPORT)
|
||||||
|
# define LDAP_SLAPD_F(type) extern __declspec(dllimport) type
|
||||||
|
# define LDAP_SLAPD_V(type) extern __declspec(dllimport) type
|
||||||
|
#else
|
||||||
|
# define LDAP_SLAPD_F(type) extern type
|
||||||
|
# define LDAP_SLAPD_V(type) extern type
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C library. Mingw32 links with the C run-time library by default,
|
* C library. Mingw32 links with the dynamic C run-time library by default,
|
||||||
* so the explicit definition of CSTATIC will keep dllimport from
|
* so the explicit definition of CSTATIC will keep dllimport from
|
||||||
* being defined.
|
* being defined, if desired.
|
||||||
|
*
|
||||||
|
* MSVC defines the _DLL macro when the compiler is invoked with /MD or /MDd,
|
||||||
|
* which means the resulting object code will be linked with the dynamic
|
||||||
|
* C run-time library.
|
||||||
|
*
|
||||||
|
* Technically, it shouldn't be necessary to redefine any functions that
|
||||||
|
* the headers for the C library should already contain. Nevertheless, this
|
||||||
|
* is here as a safe-guard.
|
||||||
|
*
|
||||||
|
* TODO: Determine if these macros ever get expanded for Windows. If not,
|
||||||
|
* the declspec expansion can probably be removed.
|
||||||
*/
|
*/
|
||||||
#if (defined(__MINGW32__) && !defined(CSTATIC) || \
|
#if (defined(__MINGW32__) && !defined(CSTATIC)) || \
|
||||||
defined(_WIN32) && defined(_DLL))
|
(defined(_MSC_VER) && defined(_DLL))
|
||||||
# define LDAP_LIBC_F(type) extern __declspec(dllimport) type
|
# define LDAP_LIBC_F(type) extern __declspec(dllimport) type
|
||||||
# define LDAP_LIBC_V(type) extern __declspec(dllimport) type
|
# define LDAP_LIBC_V(type) extern __declspec(dllimport) type
|
||||||
#else
|
#else
|
||||||
|
|
@ -90,58 +233,4 @@
|
||||||
# define LDAP_LIBC_V(type) extern type
|
# define LDAP_LIBC_V(type) extern type
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* AVL library */
|
|
||||||
#if defined(LDAP_AVL_DECL) && defined(_WIN32)
|
|
||||||
# define LDAP_AVL_F(type) extern __declspec(LDAP_AVL_DECL) type
|
|
||||||
# define LDAP_AVL_V(type) extern __declspec(LDAP_AVL_DECL) type
|
|
||||||
#else
|
|
||||||
# define LDAP_AVL_F(type) extern type
|
|
||||||
# define LDAP_AVL_V(type) extern type
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* LDBM library */
|
|
||||||
#if defined(LDAP_LDBM_DECL) && defined(_WIN32)
|
|
||||||
# define LDAP_LDBM_F(type) extern __declspec(LDAP_LDBM_DECL) type
|
|
||||||
# define LDAP_LDBM_V(type) extern __declspec(LDAP_LDBM_DECL) type
|
|
||||||
#else
|
|
||||||
# define LDAP_LDBM_F(type) extern type
|
|
||||||
# define LDAP_LDBM_V(type) extern type
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* LDIF library */
|
|
||||||
#if defined(LDAP_LDIF_DECL) && defined(_WIN32)
|
|
||||||
# define LDAP_LDIF_F(type) extern __declspec(LDAP_LDIF_DECL) type
|
|
||||||
# define LDAP_LDIF_V(type) extern __declspec(LDAP_LDIF_DECL) type
|
|
||||||
#else
|
|
||||||
# define LDAP_LDIF_F(type) extern type
|
|
||||||
# define LDAP_LDIF_V(type) extern type
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* LUNICODE library */
|
|
||||||
#if defined(LDAP_LUNICODE_DECL) && defined(_WIN32)
|
|
||||||
# define LDAP_LUNICODE_F(type) extern __declspec(LDAP_LUNICODE_DECL) type
|
|
||||||
# define LDAP_LUNICODE_V(type) extern __declspec(LDAP_LUNICODE_DECL) type
|
|
||||||
#else
|
|
||||||
# define LDAP_LUNICODE_F(type) extern type
|
|
||||||
# define LDAP_LUNICODE_V(type) extern type
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* LUTIL library */
|
|
||||||
#if defined(LDAP_LUTIL_DECL) && defined(_WIN32)
|
|
||||||
# define LDAP_LUTIL_F(type) extern __declspec(LDAP_LUTIL_DECL) type
|
|
||||||
# define LDAP_LUTIL_V(type) extern __declspec(LDAP_LUTIL_DECL) type
|
|
||||||
#else
|
|
||||||
# define LDAP_LUTIL_F(type) extern type
|
|
||||||
# define LDAP_LUTIL_V(type) extern type
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* SLAPD (as a module exporting symbols) */
|
|
||||||
#if defined(LDAP_SLAPD_DECL) && defined(_WIN32)
|
|
||||||
# define LDAP_SLAPD_F(type) extern __declspec(LDAP_SLAPD_DECL) type
|
|
||||||
# define LDAP_SLAPD_V(type) extern __declspec(LDAP_SLAPD_DECL) type
|
|
||||||
#else
|
|
||||||
# define LDAP_SLAPD_F(type) extern type
|
|
||||||
# define LDAP_SLAPD_V(type) extern type
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _LDAP_CDEFS_H */
|
#endif /* _LDAP_CDEFS_H */
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ lutil_authpasswd_hash LDAP_P((
|
||||||
|
|
||||||
#if defined( SLAPD_SPASSWD ) && defined( HAVE_CYRUS_SASL )
|
#if defined( SLAPD_SPASSWD ) && defined( HAVE_CYRUS_SASL )
|
||||||
/* cheat to avoid pulling in <sasl.h> */
|
/* cheat to avoid pulling in <sasl.h> */
|
||||||
LDAP_LUTIL_F( struct sasl_conn * ) lutil_passwd_sasl_conn;
|
LDAP_LUTIL_V( struct sasl_conn * ) lutil_passwd_sasl_conn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LDAP_LUTIL_F( int )
|
LDAP_LUTIL_F( int )
|
||||||
|
|
@ -110,6 +110,27 @@ lutil_progname LDAP_P((
|
||||||
LDAP_LUTIL_F( int )
|
LDAP_LUTIL_F( int )
|
||||||
lutil_pair( ber_socket_t sd[2] );
|
lutil_pair( ber_socket_t sd[2] );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sometimes not all declarations in a header file are needed.
|
||||||
|
* An indicator to this is whether or not the symbol's type has
|
||||||
|
* been defined. Thus, we don't need to include a symbol if
|
||||||
|
* its type has not been defined through another header file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_NT_SERVICE_MANAGER
|
||||||
|
LDAP_LUTIL_V (int) is_NT_Service;
|
||||||
|
|
||||||
|
#ifdef _LDAP_PVT_THREAD_H
|
||||||
|
LDAP_LUTIL_V (ldap_pvt_thread_cond_t) started_event;
|
||||||
|
#endif /* _LDAP_PVT_THREAD_H */
|
||||||
|
|
||||||
|
#ifdef _WINSVC_H
|
||||||
|
LDAP_LUTIL_V (SERVICE_STATUS) SLAPDServiceStatus;
|
||||||
|
LDAP_LUTIL_V (SERVICE_STATUS_HANDLE) hSLAPDServiceStatus;
|
||||||
|
#endif /* _WINSVC_H */
|
||||||
|
|
||||||
|
#endif /* HAVE_NT_SERVICE_MANAGER */
|
||||||
|
|
||||||
LDAP_END_DECL
|
LDAP_END_DECL
|
||||||
|
|
||||||
#endif /* _LUTIL_H */
|
#endif /* _LUTIL_H */
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ struct berval; /* avoid include */
|
||||||
/*
|
/*
|
||||||
* Inits the info
|
* Inits the info
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_info *
|
LDAP_REWRITE_F (struct rewrite_info *)
|
||||||
rewrite_info_init(
|
rewrite_info_init(
|
||||||
int mode
|
int mode
|
||||||
);
|
);
|
||||||
|
|
@ -94,7 +94,7 @@ rewrite_info_init(
|
||||||
/*
|
/*
|
||||||
* Cleans up the info structure
|
* Cleans up the info structure
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_info_delete(
|
rewrite_info_delete(
|
||||||
struct rewrite_info *info
|
struct rewrite_info *info
|
||||||
);
|
);
|
||||||
|
|
@ -111,7 +111,7 @@ rewrite_info_delete(
|
||||||
* rewriteMap mapType mapName [mapArgs]
|
* rewriteMap mapType mapName [mapArgs]
|
||||||
* rewriteParam paramName paramValue
|
* rewriteParam paramName paramValue
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_parse(
|
rewrite_parse(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *fname,
|
const char *fname,
|
||||||
|
|
@ -135,7 +135,7 @@ rewrite_parse(
|
||||||
* - ok with copy of string as result,
|
* - ok with copy of string as result,
|
||||||
* - use the default rewrite context.
|
* - use the default rewrite context.
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite(
|
rewrite(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *rewriteContext,
|
const char *rewriteContext,
|
||||||
|
|
@ -146,7 +146,7 @@ rewrite(
|
||||||
/*
|
/*
|
||||||
* Same as above; the cookie relates the rewrite to a session
|
* Same as above; the cookie relates the rewrite to a session
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session(
|
rewrite_session(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *rewriteContext,
|
const char *rewriteContext,
|
||||||
|
|
@ -158,7 +158,7 @@ rewrite_session(
|
||||||
/*
|
/*
|
||||||
* Inits a session
|
* Inits a session
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_session *
|
LDAP_REWRITE_F (struct rewrite_session *)
|
||||||
rewrite_session_init(
|
rewrite_session_init(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie
|
const void *cookie
|
||||||
|
|
@ -167,7 +167,7 @@ rewrite_session_init(
|
||||||
/*
|
/*
|
||||||
* Defines and inits a variable with session scope
|
* Defines and inits a variable with session scope
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session_var_set(
|
rewrite_session_var_set(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie,
|
const void *cookie,
|
||||||
|
|
@ -178,7 +178,7 @@ rewrite_session_var_set(
|
||||||
/*
|
/*
|
||||||
* Deletes a session
|
* Deletes a session
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session_delete(
|
rewrite_session_delete(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie
|
const void *cookie
|
||||||
|
|
@ -192,7 +192,7 @@ rewrite_session_delete(
|
||||||
/*
|
/*
|
||||||
* Defines and inits a variable with global scope
|
* Defines and inits a variable with global scope
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_param_set(
|
rewrite_param_set(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
|
@ -202,7 +202,7 @@ rewrite_param_set(
|
||||||
/*
|
/*
|
||||||
* Gets a var with global scope
|
* Gets a var with global scope
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_param_get(
|
rewrite_param_get(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
|
@ -212,7 +212,7 @@ rewrite_param_get(
|
||||||
/*
|
/*
|
||||||
* Destroys the parameter tree
|
* Destroys the parameter tree
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_param_destroy(
|
rewrite_param_destroy(
|
||||||
struct rewrite_info *info
|
struct rewrite_info *info
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@
|
||||||
#ifdef CSRIMALLOC
|
#ifdef CSRIMALLOC
|
||||||
#define ber_memalloc malloc
|
#define ber_memalloc malloc
|
||||||
#define ber_memrealloc realloc
|
#define ber_memrealloc realloc
|
||||||
|
#else
|
||||||
|
#include "lber.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AVL_INTERNAL
|
#define AVL_INTERNAL
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ XLIBRARY = ../liblber.a
|
||||||
NT_SRCS = nt_err.c
|
NT_SRCS = nt_err.c
|
||||||
NT_OBJS = nt_err.lo
|
NT_OBJS = nt_err.lo
|
||||||
|
|
||||||
|
LIB_DEFS = -DLBER_LIBRARY
|
||||||
|
|
||||||
SRCS= assert.c decode.c encode.c io.c bprint.c \
|
SRCS= assert.c decode.c encode.c io.c bprint.c \
|
||||||
memory.c options.c sockbuf.c $(@PLAT@_SRCS)
|
memory.c options.c sockbuf.c $(@PLAT@_SRCS)
|
||||||
OBJS= assert.lo decode.lo encode.lo io.lo bprint.lo \
|
OBJS= assert.lo decode.lo encode.lo io.lo bprint.lo \
|
||||||
|
|
@ -24,17 +26,7 @@ LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
XLIBS = -llber
|
XLIBS = -llber
|
||||||
XXLIBS =
|
XXLIBS =
|
||||||
|
NT_LINK_LIBS = $(AC_LIBS)
|
||||||
LINKAGE = @LT_LIB_LINKAGE@
|
|
||||||
|
|
||||||
NT_DYN_TEST_DEFS = -DLBER_DECL=dllimport
|
|
||||||
|
|
||||||
# Extras for building the library
|
|
||||||
EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
|
|
||||||
EXTRA_LIBS =
|
|
||||||
|
|
||||||
# Only the test programs will pick up these defs.
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
|
|
||||||
|
|
||||||
dtest: $(LIBRARY) dtest.o
|
dtest: $(LIBRARY) dtest.o
|
||||||
$(LTLINK) -o $@ dtest.o $(LIBS)
|
$(LTLINK) -o $@ dtest.o $(LIBS)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
LDAP_BEGIN_DECL
|
LDAP_BEGIN_DECL
|
||||||
|
|
||||||
LBER_F (BER_ERRNO_FN) ber_int_errno_fn;
|
LBER_V (BER_ERRNO_FN) ber_int_errno_fn;
|
||||||
|
|
||||||
struct lber_options {
|
struct lber_options {
|
||||||
short lbo_valid;
|
short lbo_valid;
|
||||||
|
|
@ -51,7 +51,7 @@ struct lber_options {
|
||||||
#define LBER_VALID_BERELEMENT 0x2
|
#define LBER_VALID_BERELEMENT 0x2
|
||||||
#define LBER_VALID_SOCKBUF 0x3
|
#define LBER_VALID_SOCKBUF 0x3
|
||||||
|
|
||||||
LBER_F (struct lber_options) ber_int_options;
|
LBER_V (struct lber_options) ber_int_options;
|
||||||
#define ber_int_debug ber_int_options.lbo_debug
|
#define ber_int_debug ber_int_options.lbo_debug
|
||||||
|
|
||||||
struct berelement {
|
struct berelement {
|
||||||
|
|
@ -105,7 +105,8 @@ struct seqorset {
|
||||||
/*
|
/*
|
||||||
* io.c
|
* io.c
|
||||||
*/
|
*/
|
||||||
int ber_realloc LDAP_P((
|
LBER_F( int )
|
||||||
|
ber_realloc LDAP_P((
|
||||||
BerElement *ber,
|
BerElement *ber,
|
||||||
ber_len_t len ));
|
ber_len_t len ));
|
||||||
|
|
||||||
|
|
@ -146,7 +147,7 @@ ber_log_sos_dump LDAP_P((
|
||||||
|
|
||||||
/* memory.c */
|
/* memory.c */
|
||||||
/* simple macros to realloc for now */
|
/* simple macros to realloc for now */
|
||||||
LBER_F (BerMemoryFunctions *) ber_int_memory_fns;
|
LBER_V (BerMemoryFunctions *) ber_int_memory_fns;
|
||||||
LBER_F (char *) ber_strndup( LDAP_CONST char *, ber_len_t );
|
LBER_F (char *) ber_strndup( LDAP_CONST char *, ber_len_t );
|
||||||
LBER_F (char *) ber_strndup__( LDAP_CONST char *, size_t );
|
LBER_F (char *) ber_strndup__( LDAP_CONST char *, size_t );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,26 +33,11 @@ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
|
LIB_DEFS = -DLDAP_LIBRARY
|
||||||
|
|
||||||
XLIBS = -lldap -llber -llutil
|
XLIBS = -lldap -llber -llutil
|
||||||
XXLIBS = $(SECURITY_LIBS) $(TLS_LIBS)
|
XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
|
||||||
|
NT_LINK_LIBS = -llber $(AC_LIBS) $(SECURITY_LIBS)
|
||||||
LINKAGE = @LT_LIB_LINKAGE@
|
|
||||||
|
|
||||||
NT_DYN_LIB_LIBS = -llber -llutil $(AC_LIBS)
|
|
||||||
NT_DYN_LIB_DEFS = -DLBER_DECL=dllimport
|
|
||||||
NT_DYN_TEST_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
|
||||||
|
|
||||||
NT_XXLIBS = $(SECURITY_LIBS)
|
|
||||||
|
|
||||||
UNIX_DYN_LIB_LIBS = -llber $(AC_LIBS)
|
|
||||||
UNIX_XXLIBS = $(SECURITY_LIBS)
|
|
||||||
|
|
||||||
# Extras for building the library
|
|
||||||
EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
|
|
||||||
EXTRA_LIBS = $(@PLAT@_@LIB_LINKAGE@_LIB_LIBS) $(@PLAT@_XXLIBS)
|
|
||||||
|
|
||||||
# Only the test programs will pick up these defs.
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
|
|
||||||
|
|
||||||
apitest: $(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
|
apitest: $(LIBRARY) apitest.o $(LDAP_LIBLBER_DEPEND)
|
||||||
$(LTLINK) -o $@ apitest.o $(LIBS)
|
$(LTLINK) -o $@ apitest.o $(LIBS)
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,7 @@ LDAP_F ( void ) ldap_int_initialize_global_options LDAP_P((
|
||||||
/*
|
/*
|
||||||
* in error.c
|
* in error.c
|
||||||
*/
|
*/
|
||||||
void ldap_int_error_init( void );
|
LDAP_F (void) ldap_int_error_init( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* in unit-int.c
|
* in unit-int.c
|
||||||
|
|
@ -416,7 +416,7 @@ LDAP_F (int) ldap_int_open_connection( LDAP *ld,
|
||||||
/*
|
/*
|
||||||
* in os-ip.c
|
* in os-ip.c
|
||||||
*/
|
*/
|
||||||
LDAP_F (int) ldap_int_tblsize;
|
LDAP_V (int) ldap_int_tblsize;
|
||||||
LDAP_F (int) ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
|
LDAP_F (int) ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
|
||||||
LDAP_F (int) ldap_connect_to_host( LDAP *ld, Sockbuf *sb,
|
LDAP_F (int) ldap_connect_to_host( LDAP *ld, Sockbuf *sb,
|
||||||
int proto, const char *host, unsigned long address, int port,
|
int proto, const char *host, unsigned long address, int port,
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,8 @@ int ldap_pvt_url_scheme2proto( const char *scheme )
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LDAP_F(int) ldap_pvt_url_scheme2tls( const char *scheme )
|
int
|
||||||
|
ldap_pvt_url_scheme2tls( const char *scheme )
|
||||||
{
|
{
|
||||||
assert( scheme );
|
assert( scheme );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,28 +40,13 @@ OBJS = threads.lo rdwr.lo tpool.lo \
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
|
LIB_DEFS = -DLDAP_LIBRARY
|
||||||
|
|
||||||
XDEFS = -DLDAP_R_COMPILE -I$(XXDIR)
|
XDEFS = -DLDAP_R_COMPILE -I$(XXDIR)
|
||||||
XLIBS = -lldap_r -llber -llutil
|
XLIBS = -lldap_r -llber -llutil
|
||||||
XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
|
XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
|
||||||
XXXLIBS = $(LTHREAD_LIBS)
|
XXXLIBS = $(LTHREAD_LIBS)
|
||||||
|
NT_LINK_LIBS = -llber $(AC_LIBS) $(SECURITY_LIBS)
|
||||||
LINKAGE = @LT_LIB_LINKAGE@
|
|
||||||
|
|
||||||
NT_DYN_LIB_LIBS = -llber -llutil $(AC_LIBS)
|
|
||||||
NT_DYN_LIB_DEFS = -DLBER_DECL=dllimport
|
|
||||||
NT_DYN_TEST_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
|
||||||
|
|
||||||
NT_XXLIBS = $(SECURITY_LIBS)
|
|
||||||
|
|
||||||
UNIX_DYN_LIB_LIBS = -llber $(AC_LIBS)
|
|
||||||
UNIX_XXLIBS = $(SECURITY_LIBS)
|
|
||||||
|
|
||||||
# Extras for building the library
|
|
||||||
EXTRA_DEFS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
|
|
||||||
EXTRA_LIBS = $(@PLAT@_@LIB_LINKAGE@_LIB_LIBS) $(@PLAT@_XXLIBS)
|
|
||||||
|
|
||||||
# Only the test programs will pick up these defs.
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_TEST_DEFS)
|
|
||||||
|
|
||||||
.links :
|
.links :
|
||||||
@for i in $(XXSRCS); do \
|
@for i in $(XXSRCS); do \
|
||||||
|
|
@ -87,3 +72,4 @@ ttest: $(LIBRARY) tmpltest.o $(LDAP_LIBLBER_DEPEND)
|
||||||
install-local: $(CFFILES) FORCE
|
install-local: $(CFFILES) FORCE
|
||||||
-$(MKDIR) $(DESTDIR)$(libdir)
|
-$(MKDIR) $(DESTDIR)$(libdir)
|
||||||
$(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
|
$(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
#include "ldap_pvt_thread.h"
|
#include "ldap_pvt_thread.h"
|
||||||
|
|
||||||
|
/* mingw compiler very sensitive about getting prototypes right */
|
||||||
|
typedef unsigned __stdcall thrfunc_t(void *);
|
||||||
|
|
||||||
int
|
int
|
||||||
ldap_int_thread_initialize( void )
|
ldap_int_thread_initialize( void )
|
||||||
{
|
{
|
||||||
|
|
@ -35,16 +38,15 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
|
||||||
void *(*start_routine)( void *),
|
void *(*start_routine)( void *),
|
||||||
void *arg)
|
void *arg)
|
||||||
{
|
{
|
||||||
unsigned long tid;
|
unsigned tid;
|
||||||
HANDLE thd;
|
HANDLE thd;
|
||||||
|
|
||||||
thd = _beginthreadex( NULL, 0,
|
thd = (HANDLE) _beginthreadex(NULL, 0, (thrfunc_t *) start_routine,
|
||||||
(LPTHREAD_START_ROUTINE) start_routine, arg,
|
arg, 0, &tid);
|
||||||
0, &tid );
|
|
||||||
|
|
||||||
*thread = (ldap_pvt_thread_t) thd;
|
*thread = (ldap_pvt_thread_t) thd;
|
||||||
|
|
||||||
return thd == NULL ? -1 : 0;
|
return thd == NULL ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,6 @@ OBJS = ldbm.o
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
NT_DYN_LIB_DEFS = -DLDAP_DECL=dllimport
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
|
|
||||||
|
|
||||||
XLIBS = -lldbm -lavl
|
XLIBS = -lldbm -lavl
|
||||||
XXLIBS = $(LDBM_LIBS)
|
XXLIBS = $(LDBM_LIBS)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,3 @@ OBJS = line64.o fetch.o
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
NT_DYN_LIB_DEFS = -DLDAP_DECL=dllimport -DLBER_DECL=dllimport
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,9 @@ LDAP_BEGIN_DECL
|
||||||
* of properties. The macros that test for various character properties all
|
* of properties. The macros that test for various character properties all
|
||||||
* call this function with some set of masks.
|
* call this function with some set of masks.
|
||||||
*/
|
*/
|
||||||
extern int ucisprop LDAP_P((unsigned long code, unsigned long mask1,
|
LDAP_LUNICODE_F (int)
|
||||||
unsigned long mask2));
|
ucisprop LDAP_P((unsigned long code, unsigned long mask1,
|
||||||
|
unsigned long mask2));
|
||||||
|
|
||||||
#define ucisalpha(cc) ucisprop(cc, UC_LU|UC_LL|UC_LM|UC_LO|UC_LT, 0)
|
#define ucisalpha(cc) ucisprop(cc, UC_LU|UC_LL|UC_LM|UC_LO|UC_LT, 0)
|
||||||
#define ucisdigit(cc) ucisprop(cc, UC_ND, 0)
|
#define ucisdigit(cc) ucisprop(cc, UC_ND, 0)
|
||||||
|
|
@ -203,9 +204,9 @@ extern int ucisprop LDAP_P((unsigned long code, unsigned long mask1,
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
extern unsigned long uctoupper LDAP_P((unsigned long code));
|
LDAP_LUNICODE_F (unsigned long) uctoupper LDAP_P((unsigned long code));
|
||||||
extern unsigned long uctolower LDAP_P((unsigned long code));
|
LDAP_LUNICODE_F (unsigned long) uctolower LDAP_P((unsigned long code));
|
||||||
extern unsigned long uctotitle LDAP_P((unsigned long code));
|
LDAP_LUNICODE_F (unsigned long) uctotitle LDAP_P((unsigned long code));
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -218,20 +219,20 @@ extern unsigned long uctotitle LDAP_P((unsigned long code));
|
||||||
* If it returns 0, there is no composition. Any other value indicates a
|
* If it returns 0, there is no composition. Any other value indicates a
|
||||||
* composition was returned in comp.
|
* composition was returned in comp.
|
||||||
*/
|
*/
|
||||||
extern int uccomp LDAP_P((unsigned long node1, unsigned long node2,
|
LDAP_LUNICODE_F (int) uccomp LDAP_P((unsigned long node1, unsigned long node2,
|
||||||
unsigned long *comp));
|
unsigned long *comp));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Does Hangul composition on the string str with length len, and returns
|
* Does Hangul composition on the string str with length len, and returns
|
||||||
* the length of the composed string.
|
* the length of the composed string.
|
||||||
*/
|
*/
|
||||||
extern int uccomp_hangul LDAP_P((unsigned long *str, int len));
|
LDAP_LUNICODE_F (int) uccomp_hangul LDAP_P((unsigned long *str, int len));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Does canonical composition on the string str with length len, and returns
|
* Does canonical composition on the string str with length len, and returns
|
||||||
* the length of the composed string.
|
* the length of the composed string.
|
||||||
*/
|
*/
|
||||||
extern int uccanoncomp LDAP_P((unsigned long *str, int len));
|
LDAP_LUNICODE_F (int) uccanoncomp LDAP_P((unsigned long *str, int len));
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -244,15 +245,17 @@ extern int uccanoncomp LDAP_P((unsigned long *str, int len));
|
||||||
* there is no decomposition. Any other value indicates a decomposition was
|
* there is no decomposition. Any other value indicates a decomposition was
|
||||||
* returned.
|
* returned.
|
||||||
*/
|
*/
|
||||||
extern int ucdecomp LDAP_P((unsigned long code, unsigned long *num,
|
LDAP_LUNICODE_F (int)
|
||||||
unsigned long **decomp));
|
ucdecomp LDAP_P((unsigned long code, unsigned long *num,
|
||||||
|
unsigned long **decomp));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the code is a Hangul syllable, this routine decomposes it into the array
|
* If the code is a Hangul syllable, this routine decomposes it into the array
|
||||||
* passed. The array size should be at least 3.
|
* passed. The array size should be at least 3.
|
||||||
*/
|
*/
|
||||||
extern int ucdecomp_hangul LDAP_P((unsigned long code, unsigned long *num,
|
LDAP_LUNICODE_F (int)
|
||||||
unsigned long decomp[]));
|
ucdecomp_hangul LDAP_P((unsigned long code, unsigned long *num,
|
||||||
|
unsigned long decomp[]));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine does canonical decomposition of the string in of length
|
* This routine does canonical decomposition of the string in of length
|
||||||
|
|
@ -260,8 +263,9 @@ extern int ucdecomp_hangul LDAP_P((unsigned long code, unsigned long *num,
|
||||||
* The memory for out is allocated by this routine. It returns the length
|
* The memory for out is allocated by this routine. It returns the length
|
||||||
* of the decomposed string if okay, and -1 on error.
|
* of the decomposed string if okay, and -1 on error.
|
||||||
*/
|
*/
|
||||||
extern int uccanondecomp LDAP_P((const unsigned long *in, int inlen,
|
LDAP_LUNICODE_F (int)
|
||||||
unsigned long **out, int *outlen));
|
uccanondecomp LDAP_P((const unsigned long *in, int inlen,
|
||||||
|
unsigned long **out, int *outlen));
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -273,7 +277,7 @@ extern int uccanondecomp LDAP_P((const unsigned long *in, int inlen,
|
||||||
* This will return the combining class for a character to be used with the
|
* This will return the combining class for a character to be used with the
|
||||||
* Canonical Ordering algorithm.
|
* Canonical Ordering algorithm.
|
||||||
*/
|
*/
|
||||||
extern unsigned long uccombining_class LDAP_P((unsigned long code));
|
LDAP_LUNICODE_F (unsigned long) uccombining_class LDAP_P((unsigned long code));
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -286,14 +290,17 @@ struct ucnumber {
|
||||||
int denominator;
|
int denominator;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int ucnumber_lookup LDAP_P((unsigned long code, struct ucnumber *num));
|
LDAP_LUNICODE_F (int)
|
||||||
extern int ucdigit_lookup LDAP_P((unsigned long code, int *digit));
|
ucnumber_lookup LDAP_P((unsigned long code, struct ucnumber *num));
|
||||||
|
|
||||||
|
LDAP_LUNICODE_F (int)
|
||||||
|
ucdigit_lookup LDAP_P((unsigned long code, int *digit));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For compatibility with John Cowan's "uctype" package.
|
* For compatibility with John Cowan's "uctype" package.
|
||||||
*/
|
*/
|
||||||
extern struct ucnumber ucgetnumber LDAP_P((unsigned long code));
|
LDAP_LUNICODE_F (struct ucnumber) ucgetnumber LDAP_P((unsigned long code));
|
||||||
extern int ucgetdigit LDAP_P((unsigned long code));
|
LDAP_LUNICODE_F (int) ucgetdigit LDAP_P((unsigned long code));
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -318,9 +325,9 @@ extern int ucgetdigit LDAP_P((unsigned long code));
|
||||||
/*
|
/*
|
||||||
* Functions to load, unload, and reload specific data files.
|
* Functions to load, unload, and reload specific data files.
|
||||||
*/
|
*/
|
||||||
extern int ucdata_load LDAP_P((char *paths, int mask));
|
LDAP_LUNICODE_F (int) ucdata_load LDAP_P((char *paths, int mask));
|
||||||
extern void ucdata_unload LDAP_P((int mask));
|
LDAP_LUNICODE_F (void) ucdata_unload LDAP_P((int mask));
|
||||||
extern int ucdata_reload LDAP_P((char *paths, int mask));
|
LDAP_LUNICODE_F (int) ucdata_reload LDAP_P((char *paths, int mask));
|
||||||
|
|
||||||
#ifdef UCDATA_DEPRECATED
|
#ifdef UCDATA_DEPRECATED
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -105,21 +105,23 @@ typedef struct _ucstring_t {
|
||||||
* of a string containing no strong direction characters and the default
|
* of a string containing no strong direction characters and the default
|
||||||
* cursor motion should be provided.
|
* cursor motion should be provided.
|
||||||
*/
|
*/
|
||||||
extern ucstring_t *ucstring_create LDAP_P((unsigned long *source,
|
LDAP_LUNICODE_F (ucstring_t *)
|
||||||
unsigned long start,
|
ucstring_create LDAP_P((unsigned long *source,
|
||||||
unsigned long end,
|
unsigned long start,
|
||||||
int default_direction,
|
unsigned long end,
|
||||||
int cursor_motion));
|
int default_direction,
|
||||||
|
int cursor_motion));
|
||||||
/*
|
/*
|
||||||
* This releases the string.
|
* This releases the string.
|
||||||
*/
|
*/
|
||||||
extern void ucstring_free LDAP_P((ucstring_t *string));
|
LDAP_LUNICODE_F (void) ucstring_free LDAP_P((ucstring_t *string));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This changes the cursor motion flag for the string.
|
* This changes the cursor motion flag for the string.
|
||||||
*/
|
*/
|
||||||
extern int ucstring_set_cursor_motion LDAP_P((ucstring_t *string,
|
LDAP_LUNICODE_F (int)
|
||||||
int cursor_motion));
|
ucstring_set_cursor_motion LDAP_P((ucstring_t *string,
|
||||||
|
int cursor_motion));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function will move the cursor to the right depending on the
|
* This function will move the cursor to the right depending on the
|
||||||
|
|
@ -128,7 +130,8 @@ extern int ucstring_set_cursor_motion LDAP_P((ucstring_t *string,
|
||||||
* A 0 is returned if no cursor motion is performed, otherwise a
|
* A 0 is returned if no cursor motion is performed, otherwise a
|
||||||
* 1 is returned.
|
* 1 is returned.
|
||||||
*/
|
*/
|
||||||
extern int ucstring_cursor_right LDAP_P((ucstring_t *string, int count));
|
LDAP_LUNICODE_F (int)
|
||||||
|
ucstring_cursor_right LDAP_P((ucstring_t *string, int count));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function will move the cursor to the left depending on the
|
* This function will move the cursor to the left depending on the
|
||||||
|
|
@ -137,14 +140,16 @@ extern int ucstring_cursor_right LDAP_P((ucstring_t *string, int count));
|
||||||
* A 0 is returned if no cursor motion is performed, otherwise a
|
* A 0 is returned if no cursor motion is performed, otherwise a
|
||||||
* 1 is returned.
|
* 1 is returned.
|
||||||
*/
|
*/
|
||||||
extern int ucstring_cursor_left LDAP_P((ucstring_t *string, int count));
|
LDAP_LUNICODE_F (int)
|
||||||
|
ucstring_cursor_left LDAP_P((ucstring_t *string, int count));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine retrieves the direction of the run containing the cursor
|
* This routine retrieves the direction of the run containing the cursor
|
||||||
* and the actual position in the original text string.
|
* and the actual position in the original text string.
|
||||||
*/
|
*/
|
||||||
extern void ucstring_cursor_info LDAP_P((ucstring_t *string, int *direction,
|
LDAP_LUNICODE_F (void)
|
||||||
unsigned long *position));
|
ucstring_cursor_info LDAP_P((ucstring_t *string, int *direction,
|
||||||
|
unsigned long *position));
|
||||||
|
|
||||||
LDAP_END_DECL
|
LDAP_END_DECL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,20 +113,22 @@ typedef struct _ure_dfa_t *ure_dfa_t;
|
||||||
*
|
*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
extern ure_buffer_t ure_buffer_create LDAP_P((void));
|
LDAP_LUNICODE_F (ure_buffer_t) ure_buffer_create LDAP_P((void));
|
||||||
|
|
||||||
extern void ure_buffer_free LDAP_P((ure_buffer_t buf));
|
LDAP_LUNICODE_F (void) ure_buffer_free LDAP_P((ure_buffer_t buf));
|
||||||
|
|
||||||
extern ure_dfa_t ure_compile LDAP_P((ucs2_t *re, unsigned long relen,
|
LDAP_LUNICODE_F (ure_dfa_t)
|
||||||
int casefold, ure_buffer_t buf));
|
ure_compile LDAP_P((ucs2_t *re, unsigned long relen,
|
||||||
|
int casefold, ure_buffer_t buf));
|
||||||
|
|
||||||
extern void ure_dfa_free LDAP_P((ure_dfa_t dfa));
|
LDAP_LUNICODE_F (void) ure_dfa_free LDAP_P((ure_dfa_t dfa));
|
||||||
|
|
||||||
extern void ure_write_dfa LDAP_P((ure_dfa_t dfa, FILE *out));
|
LDAP_LUNICODE_F (void) ure_write_dfa LDAP_P((ure_dfa_t dfa, FILE *out));
|
||||||
|
|
||||||
extern int ure_exec LDAP_P((ure_dfa_t dfa, int flags,
|
LDAP_LUNICODE_F (int)
|
||||||
ucs2_t *text, unsigned long textlen,
|
ure_exec LDAP_P((ure_dfa_t dfa, int flags, ucs2_t *text,
|
||||||
unsigned long *match_start, unsigned long *match_end));
|
unsigned long textlen, unsigned long *match_start,
|
||||||
|
unsigned long *match_end));
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -135,9 +137,10 @@ extern int ure_exec LDAP_P((ure_dfa_t dfa, int flags,
|
||||||
*
|
*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
extern ucs4_t _ure_tolower LDAP_P((ucs4_t c));
|
LDAP_LUNICODE_F (ucs4_t) _ure_tolower LDAP_P((ucs4_t c));
|
||||||
|
|
||||||
extern int _ure_matches_properties LDAP_P((unsigned long props, ucs4_t c));
|
LDAP_LUNICODE_F (int)
|
||||||
|
_ure_matches_properties LDAP_P((unsigned long props, ucs4_t c));
|
||||||
|
|
||||||
LDAP_END_DECL
|
LDAP_END_DECL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,16 +64,18 @@ typedef struct _utbm_pattern_t *utbm_pattern_t;
|
||||||
*
|
*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
extern utbm_pattern_t utbm_create_pattern LDAP_P((void));
|
LDAP_LUNICODE_F (utbm_pattern_t) utbm_create_pattern LDAP_P((void));
|
||||||
|
|
||||||
extern void utbm_free_pattern LDAP_P((utbm_pattern_t pattern));
|
LDAP_LUNICODE_F (void) utbm_free_pattern LDAP_P((utbm_pattern_t pattern));
|
||||||
|
|
||||||
extern void utbm_compile LDAP_P((ucs2_t *pat, unsigned long patlen,
|
LDAP_LUNICODE_F (void)
|
||||||
unsigned long flags, utbm_pattern_t pattern));
|
utbm_compile LDAP_P((ucs2_t *pat, unsigned long patlen,
|
||||||
|
unsigned long flags, utbm_pattern_t pattern));
|
||||||
|
|
||||||
extern int utbm_exec LDAP_P((utbm_pattern_t pat, ucs2_t *text,
|
LDAP_LUNICODE_F (int)
|
||||||
unsigned long textlen, unsigned long *match_start,
|
utbm_exec LDAP_P((utbm_pattern_t pat, ucs2_t *text,
|
||||||
unsigned long *match_end));
|
unsigned long textlen, unsigned long *match_start,
|
||||||
|
unsigned long *match_end));
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
|
|
@ -81,17 +83,17 @@ extern int utbm_exec LDAP_P((utbm_pattern_t pat, ucs2_t *text,
|
||||||
*
|
*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
extern int _utbm_isspace LDAP_P((ucs4_t c, int compress));
|
LDAP_LUNICODE_F (int) _utbm_isspace LDAP_P((ucs4_t c, int compress));
|
||||||
|
|
||||||
extern int _utbm_iscntrl LDAP_P((ucs4_t c));
|
LDAP_LUNICODE_F (int) _utbm_iscntrl LDAP_P((ucs4_t c));
|
||||||
|
|
||||||
extern int _utbm_nonspacing LDAP_P((ucs4_t c));
|
LDAP_LUNICODE_F (int) _utbm_nonspacing LDAP_P((ucs4_t c));
|
||||||
|
|
||||||
extern ucs4_t _utbm_tolower LDAP_P((ucs4_t c));
|
LDAP_LUNICODE_F (ucs4_t) _utbm_tolower LDAP_P((ucs4_t c));
|
||||||
|
|
||||||
extern ucs4_t _utbm_toupper LDAP_P((ucs4_t c));
|
LDAP_LUNICODE_F (ucs4_t) _utbm_toupper LDAP_P((ucs4_t c));
|
||||||
|
|
||||||
extern ucs4_t _utbm_totitle LDAP_P((ucs4_t c));
|
LDAP_LUNICODE_F (ucs4_t) _utbm_totitle LDAP_P((ucs4_t c));
|
||||||
|
|
||||||
LDAP_END_DECL
|
LDAP_END_DECL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,6 @@ OBJS = base64.o csn.o debug.o entropy.o sasl.o signal.o hash.o \
|
||||||
LDAP_INCDIR= ../../include
|
LDAP_INCDIR= ../../include
|
||||||
LDAP_LIBDIR= ../../libraries
|
LDAP_LIBDIR= ../../libraries
|
||||||
|
|
||||||
NT_DYN_LIB_DEFS = -DLDAP_DECL=dllimport
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
|
|
||||||
|
|
||||||
# These rules are for a Mingw32 build, specifically.
|
# These rules are for a Mingw32 build, specifically.
|
||||||
# It's ok for them to be here because the clean rule is harmless, and
|
# It's ok for them to be here because the clean rule is harmless, and
|
||||||
# slapdmsg.res won't get built unless it's declared in OBJS.
|
# slapdmsg.res won't get built unless it's declared in OBJS.
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,16 @@
|
||||||
|
|
||||||
#include <ldap.h>
|
#include <ldap.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The whole debug implementation is a bit of a hack.
|
||||||
|
* We have to define this LDAP_SLAPD_V macro here since the slap.h
|
||||||
|
* header file isn't included (and really shouldn't be).
|
||||||
|
* TODO: re-implement debug functions so that the debug level can
|
||||||
|
* be passed around instead of having to count on the existence of
|
||||||
|
* ldap_debug, slap_debug, etc.
|
||||||
|
*/
|
||||||
#define ldap_debug slap_debug
|
#define ldap_debug slap_debug
|
||||||
extern int slap_debug;
|
LDAP_SLAPD_V (int) slap_debug;
|
||||||
|
|
||||||
#include "ldap_log.h"
|
#include "ldap_log.h"
|
||||||
#include "ldap_pvt_thread.h"
|
#include "ldap_pvt_thread.h"
|
||||||
|
|
|
||||||
|
|
@ -321,14 +321,14 @@ struct rewrite_info {
|
||||||
/*
|
/*
|
||||||
* Parses a map (also in legacy 'x' version)
|
* Parses a map (also in legacy 'x' version)
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_map *
|
LDAP_REWRITE_F (struct rewrite_map *)
|
||||||
rewrite_map_parse(
|
rewrite_map_parse(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *s,
|
const char *s,
|
||||||
const char **end
|
const char **end
|
||||||
);
|
);
|
||||||
|
|
||||||
extern struct rewrite_map *
|
LDAP_REWRITE_F (struct rewrite_map *)
|
||||||
rewrite_xmap_parse(
|
rewrite_xmap_parse(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *s,
|
const char *s,
|
||||||
|
|
@ -338,7 +338,7 @@ rewrite_xmap_parse(
|
||||||
/*
|
/*
|
||||||
* Resolves key in val by means of map (also in legacy 'x' version)
|
* Resolves key in val by means of map (also in legacy 'x' version)
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_map_apply(
|
rewrite_map_apply(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
struct rewrite_op *op,
|
struct rewrite_op *op,
|
||||||
|
|
@ -347,7 +347,7 @@ rewrite_map_apply(
|
||||||
struct berval *val
|
struct berval *val
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_xmap_apply(
|
rewrite_xmap_apply(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
struct rewrite_op *op,
|
struct rewrite_op *op,
|
||||||
|
|
@ -364,7 +364,7 @@ rewrite_xmap_apply(
|
||||||
/*
|
/*
|
||||||
* Compiles a substitution pattern
|
* Compiles a substitution pattern
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_subst *
|
LDAP_REWRITE_F (struct rewrite_subst *)
|
||||||
rewrite_subst_compile(
|
rewrite_subst_compile(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *result
|
const char *result
|
||||||
|
|
@ -374,7 +374,7 @@ rewrite_subst_compile(
|
||||||
* Substitutes a portion of rewritten string according to substitution
|
* Substitutes a portion of rewritten string according to substitution
|
||||||
* pattern using submatches
|
* pattern using submatches
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_subst_apply(
|
rewrite_subst_apply(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
struct rewrite_op *op,
|
struct rewrite_op *op,
|
||||||
|
|
@ -392,7 +392,7 @@ rewrite_subst_apply(
|
||||||
/*
|
/*
|
||||||
* Compiles the rule and appends it at the running context
|
* Compiles the rule and appends it at the running context
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_rule_compile(
|
rewrite_rule_compile(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
struct rewrite_context *context,
|
struct rewrite_context *context,
|
||||||
|
|
@ -410,7 +410,7 @@ rewrite_rule_compile(
|
||||||
* REWRITE_REGEXEC_UNWILL: rule matched; force 'unwilling to perform'
|
* REWRITE_REGEXEC_UNWILL: rule matched; force 'unwilling to perform'
|
||||||
* REWRITE_REGEXEC_ERR: an error occurred
|
* REWRITE_REGEXEC_ERR: an error occurred
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_rule_apply(
|
rewrite_rule_apply(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
struct rewrite_op *op,
|
struct rewrite_op *op,
|
||||||
|
|
@ -426,7 +426,7 @@ rewrite_rule_apply(
|
||||||
/*
|
/*
|
||||||
* Fetches a struct rewrite_session
|
* Fetches a struct rewrite_session
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_session *
|
LDAP_REWRITE_F (struct rewrite_session *)
|
||||||
rewrite_session_find(
|
rewrite_session_find(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie
|
const void *cookie
|
||||||
|
|
@ -435,7 +435,7 @@ rewrite_session_find(
|
||||||
/*
|
/*
|
||||||
* Defines and inits a variable with session scope
|
* Defines and inits a variable with session scope
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session_var_set(
|
rewrite_session_var_set(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie,
|
const void *cookie,
|
||||||
|
|
@ -446,7 +446,7 @@ rewrite_session_var_set(
|
||||||
/*
|
/*
|
||||||
* Gets a var with session scope
|
* Gets a var with session scope
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session_var_get(
|
rewrite_session_var_get(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie,
|
const void *cookie,
|
||||||
|
|
@ -457,7 +457,7 @@ rewrite_session_var_get(
|
||||||
/*
|
/*
|
||||||
* Deletes a session
|
* Deletes a session
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session_delete(
|
rewrite_session_delete(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const void *cookie
|
const void *cookie
|
||||||
|
|
@ -466,7 +466,7 @@ rewrite_session_delete(
|
||||||
/*
|
/*
|
||||||
* Destroys the cookie tree
|
* Destroys the cookie tree
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_session_destroy(
|
rewrite_session_destroy(
|
||||||
struct rewrite_info *info
|
struct rewrite_info *info
|
||||||
);
|
);
|
||||||
|
|
@ -479,7 +479,7 @@ rewrite_session_destroy(
|
||||||
/*
|
/*
|
||||||
* Finds a var
|
* Finds a var
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_var *
|
LDAP_REWRITE_F (struct rewrite_var *)
|
||||||
rewrite_var_find(
|
rewrite_var_find(
|
||||||
Avlnode *tree,
|
Avlnode *tree,
|
||||||
const char *name
|
const char *name
|
||||||
|
|
@ -488,7 +488,7 @@ rewrite_var_find(
|
||||||
/*
|
/*
|
||||||
* Inserts a newly created var
|
* Inserts a newly created var
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_var *
|
LDAP_REWRITE_F (struct rewrite_var *)
|
||||||
rewrite_var_insert(
|
rewrite_var_insert(
|
||||||
Avlnode **tree,
|
Avlnode **tree,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
|
@ -498,7 +498,7 @@ rewrite_var_insert(
|
||||||
/*
|
/*
|
||||||
* Sets/inserts a var
|
* Sets/inserts a var
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_var *
|
LDAP_REWRITE_F (struct rewrite_var *)
|
||||||
rewrite_var_set(
|
rewrite_var_set(
|
||||||
Avlnode **tree,
|
Avlnode **tree,
|
||||||
const char *name,
|
const char *name,
|
||||||
|
|
@ -509,7 +509,7 @@ rewrite_var_set(
|
||||||
/*
|
/*
|
||||||
* Deletes a var tree
|
* Deletes a var tree
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_var_delete(
|
rewrite_var_delete(
|
||||||
Avlnode *tree
|
Avlnode *tree
|
||||||
);
|
);
|
||||||
|
|
@ -522,7 +522,7 @@ rewrite_var_delete(
|
||||||
/*
|
/*
|
||||||
* Finds the context named rewriteContext in the context tree
|
* Finds the context named rewriteContext in the context tree
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_context *
|
LDAP_REWRITE_F (struct rewrite_context *)
|
||||||
rewrite_context_find(
|
rewrite_context_find(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *rewriteContext
|
const char *rewriteContext
|
||||||
|
|
@ -531,7 +531,7 @@ rewrite_context_find(
|
||||||
/*
|
/*
|
||||||
* Creates a new context called rewriteContext and stores in into the tree
|
* Creates a new context called rewriteContext and stores in into the tree
|
||||||
*/
|
*/
|
||||||
extern struct rewrite_context *
|
LDAP_REWRITE_F (struct rewrite_context *)
|
||||||
rewrite_context_create(
|
rewrite_context_create(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *rewriteContext
|
const char *rewriteContext
|
||||||
|
|
@ -543,7 +543,7 @@ rewrite_context_create(
|
||||||
* STOP: fine, rule matched; stop processing following rules
|
* STOP: fine, rule matched; stop processing following rules
|
||||||
* UNWILL: rule matched; force 'unwilling to perform'
|
* UNWILL: rule matched; force 'unwilling to perform'
|
||||||
*/
|
*/
|
||||||
extern int
|
LDAP_REWRITE_F (int)
|
||||||
rewrite_context_apply(
|
rewrite_context_apply(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
struct rewrite_op *op,
|
struct rewrite_op *op,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
/*
|
/*
|
||||||
* Retrieves a builtin map
|
* Retrieves a builtin map
|
||||||
*/
|
*/
|
||||||
struct rewrite_builtin_map *
|
LDAP_REWRITE_F (struct rewrite_builtin_map *)
|
||||||
rewrite_builtin_map_find(
|
rewrite_builtin_map_find(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *name
|
const char *name
|
||||||
|
|
@ -38,7 +38,7 @@ rewrite_builtin_map_find(
|
||||||
/*
|
/*
|
||||||
* LDAP map
|
* LDAP map
|
||||||
*/
|
*/
|
||||||
void *
|
LDAP_REWRITE_F (void *)
|
||||||
map_ldap_parse(
|
map_ldap_parse(
|
||||||
struct rewrite_info *info,
|
struct rewrite_info *info,
|
||||||
const char *fname,
|
const char *fname,
|
||||||
|
|
@ -47,7 +47,7 @@ map_ldap_parse(
|
||||||
char **argv
|
char **argv
|
||||||
);
|
);
|
||||||
|
|
||||||
int
|
LDAP_REWRITE_F (int)
|
||||||
map_ldap_apply( struct rewrite_builtin_map *map,
|
map_ldap_apply( struct rewrite_builtin_map *map,
|
||||||
const char *filter,
|
const char *filter,
|
||||||
struct berval *val
|
struct berval *val
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,7 @@ XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
|
||||||
|
|
||||||
# $(LTHREAD_LIBS) must be last
|
# $(LTHREAD_LIBS) must be last
|
||||||
XLIBS = libbackends.a -lavl @LDBM_LIB@ -lldif -llutil -llunicode -lldap_r -llber
|
XLIBS = libbackends.a -lavl @LDBM_LIB@ -lldif -llutil -llunicode -lldap_r -llber
|
||||||
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
|
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)
|
||||||
$(SECURITY_LIBS) \
|
|
||||||
$(LDIF_LIBS) $(LUTIL_LIBS)
|
|
||||||
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
|
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
|
||||||
|
|
||||||
BUILD_OPT = "--enable-slapd"
|
BUILD_OPT = "--enable-slapd"
|
||||||
|
|
@ -56,120 +54,217 @@ BUILD_SRV = @BUILD_SLAPD@
|
||||||
|
|
||||||
all-local-srv: all-cffiles
|
all-local-srv: all-cffiles
|
||||||
|
|
||||||
NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
NT_SLAPD_DEPENDS = slapd.exp
|
||||||
|
NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o
|
||||||
|
|
||||||
DEFINES = $(@PLAT@_@LIB_LINKAGE@_DEFS)
|
UNIX_SLAPD_DEPENDS = libbackends.a version.o
|
||||||
|
UNIX_SLAPD_OBJECTS = $(OBJS) version.o
|
||||||
|
|
||||||
# The tricky part about building slapd in NT is that it will export symbols
|
SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
|
||||||
# like a DLL. The symbols that it exports should be representative of all
|
SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
|
||||||
# of the static symbols that it knows about.
|
|
||||||
|
|
||||||
NT_EXP = slapd.exp
|
# Notes about slapd for Windows
|
||||||
NT_IMPLIB = libslapd.a
|
# =============================
|
||||||
NT_DUMMY = symdummy.o
|
# slapd.exe must export all of its global symbols, just like a DLL.
|
||||||
|
# The purpose of this is to allow dynamic modules (dynamic backends
|
||||||
|
# or external dynamic modules) to bind with the symbols at run-time.
|
||||||
|
#
|
||||||
|
# Exporting symbols from an .EXE is a bit tricky and involves multiple
|
||||||
|
# steps. First a .DEF file must be generated. The .DEF file indicates
|
||||||
|
# the set of symbols that are to be exported. Many times, it's possible
|
||||||
|
# to manually create this file with an editor. However, with slapd,
|
||||||
|
# we want to export EVERY global symbol that it knows about (NOT including
|
||||||
|
# symbols that are imported from other DLLs). The set of symbols to
|
||||||
|
# export INCLUDES symbols from all static libraries that slapd gets
|
||||||
|
# linked with, e.g. avl, ldbm, ldif, lunicode, lutil, etc. This list
|
||||||
|
# will also include liblber and libldap_r if they were built as static
|
||||||
|
# libraries. ALSO included will be symbols from other STATIC libraries
|
||||||
|
# outside the domain of the OpenLDAP source tree, e.g. regex, ltdl,
|
||||||
|
# crypto, ssl, sasl, etc. (If these libraries are dynamic, we won't want
|
||||||
|
# to include their symbols in the list). The correct set of symbols
|
||||||
|
# CAN be determined at build time. The slapd.def target automatically
|
||||||
|
# determines the correct set of symbols and generates the slapd.def file.
|
||||||
|
#
|
||||||
|
# The slapd.def file, serving multiple purposes, will:
|
||||||
|
#
|
||||||
|
# 1) be used to generate libslapd.a, the import library for slapd.exe.
|
||||||
|
#
|
||||||
|
# 2) be used to generate the symdummy.c file.
|
||||||
|
#
|
||||||
|
# 3) be used to help create slapd.exp, the binary-formated slapd export file.
|
||||||
|
#
|
||||||
|
# The import library is used by dynamic modules at link time. With this
|
||||||
|
# library, dynamic modules indicate to the linker that it will resolve
|
||||||
|
# these symbols from the slapd.exe binary at run-time. Of course, whenever
|
||||||
|
# a module imports dynamic symbols, those symbols should be marked with
|
||||||
|
# the __declspec(dllimport) directive in the header files that the dynamic
|
||||||
|
# modules build with. In OpenLDAP, this is handled automatically in the
|
||||||
|
# header files. (See ldap_cdefs.h for an explanation). Writers of
|
||||||
|
# dynamic backend modules should keep in mind that slapd.exe might export
|
||||||
|
# other global symbols that are not part of OpenLDAP (e.g. regex, ltdl,
|
||||||
|
# crypto, ssl, sasl, etc.) When a writer actually uses (i.e. imports) these
|
||||||
|
# symbols, he must verify that the header files from these external packages
|
||||||
|
# include a mechanism to mark imported symbols with the __declspec(dllimport)
|
||||||
|
# directive. Whether or not such a mechanism exists, the writer must be
|
||||||
|
# able to include these directives appropriately when their symbols are
|
||||||
|
# being imported from slapd.exe. The directive is not completely necessary
|
||||||
|
# for functions, but it is required for variables.
|
||||||
|
#
|
||||||
|
# The symdummy.c file basically references EVERY symbol available to slapd.exe,
|
||||||
|
# including symbols that slapd.exe never actually refereneced. The file
|
||||||
|
# is compiled and included at link time. Without this object file, slapd.exe
|
||||||
|
# would NOT export symbols that it never referenced. The reason that these
|
||||||
|
# symbols must still be exported is because a dynamic module may want to
|
||||||
|
# use a symbol even if it had not been referenced by slapd.exe.
|
||||||
|
#
|
||||||
|
|
||||||
# Add extra def targets here
|
#
|
||||||
EXTRA_DEFS =
|
# slapd.def REALLY depends upon all slapd objects and all static libraries
|
||||||
|
# included in $(LIBS), including static libraries outside of OpenLDAP.
|
||||||
|
# When slapd.def is built, the absolute paths to all static libraries
|
||||||
|
# (both inside and outside of OpenLDAP) are generated. We don't have
|
||||||
|
# any way to include this generated list as a dependency of slapd.def (sigh).
|
||||||
|
# Thus, we do the best we can by depending on version.o, which depends
|
||||||
|
# on its own very long list of dependencies.
|
||||||
|
#
|
||||||
|
slapd.def: libbackends.a version.o
|
||||||
|
@for i in $(LDFLAGS) ; do \
|
||||||
|
path=`expr "$$i" : "-L\(.*\)"`; \
|
||||||
|
if test $$? != 0; then continue; fi; \
|
||||||
|
paths="$$paths $$path"; \
|
||||||
|
done; \
|
||||||
|
objs=""; \
|
||||||
|
for i in $(OBJS) version.o $(LIBS) ; do \
|
||||||
|
case $$i in \
|
||||||
|
-l*) \
|
||||||
|
obj="" ; \
|
||||||
|
done="" ;\
|
||||||
|
base=`expr "$$i" : "-l\(.*\)"`; \
|
||||||
|
for p in $$paths ; do \
|
||||||
|
for ext in la dll a ; do \
|
||||||
|
path=$$p/lib$$base.$$ext; \
|
||||||
|
test ! -f $$path && continue; \
|
||||||
|
if test $$ext = la ; then \
|
||||||
|
for t in dlname old_library ; do \
|
||||||
|
line=`grep "^$$t=" $$path`; \
|
||||||
|
lib=`expr "$$line" : "[^']*'\(.*\)'"`; \
|
||||||
|
test -n "$$lib" && test -f $$p/$$lib && \
|
||||||
|
path=$$p/$$lib && break; \
|
||||||
|
done; \
|
||||||
|
test $$t = dlname && ext=dll; \
|
||||||
|
test $$t = old_library && ext=a; \
|
||||||
|
fi; \
|
||||||
|
if test $$ext = a ; then \
|
||||||
|
obj=$$path; \
|
||||||
|
fi; \
|
||||||
|
done=done; \
|
||||||
|
break; \
|
||||||
|
done; \
|
||||||
|
test -n "$$done" && break; \
|
||||||
|
done; \
|
||||||
|
test -z "$$obj" && continue; \
|
||||||
|
;; \
|
||||||
|
*.o | *.a) \
|
||||||
|
obj=$$i; \
|
||||||
|
esac; \
|
||||||
|
objs="$$objs $$obj"; \
|
||||||
|
done; \
|
||||||
|
echo dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols \
|
||||||
|
--output-def $@.tmp $$objs; \
|
||||||
|
dlltool --exclude-symbols main,ServiceMain@8 --export-all-symbols \
|
||||||
|
--output-def $@.tmp $$objs;
|
||||||
|
echo EXPORTS > $@
|
||||||
|
$(SED) -e 1,2d -e 's/ @ [0-9][0-9]*//' $@.tmp | sort >> $@
|
||||||
|
$(RM) $@.tmp
|
||||||
|
|
||||||
# NT needs this if libltdl is built statically. You'll have to fix the path
|
symdummy.c: slapd.def
|
||||||
# to point to where libltdl was built, then put ltdl.def in EXTRA_DEFS
|
$(RM) $@
|
||||||
ltdl.def: ../../../libtool/libltdl/*.o
|
@echo "generating $@..."; \
|
||||||
dlltool --export-all-symbols --output-def $@ $^
|
echo "static void never_called() {" > $@.tmp; \
|
||||||
|
cat $< | while read line; \
|
||||||
DYNAMIC_DEFS = liblber.def libldap_r.def
|
|
||||||
|
|
||||||
STATIC_DEFS = libavl.def libldbm.def libldif.def liblutil.def slapd.def \
|
|
||||||
$(EXTRA_DEFS)
|
|
||||||
|
|
||||||
libavl.def: $(LDAP_LIBDIR)/libavl/*.o
|
|
||||||
dlltool --export-all-symbols --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
liblber.def: $(LDAP_LIBDIR)/liblber/*.o
|
|
||||||
dlltool --export-all-symbols --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
libldap_r.def: $(LDAP_LIBDIR)/libldap_r/*.o
|
|
||||||
dlltool --export-all-symbols --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
libldbm.def: $(LDAP_LIBDIR)/libldbm/*.o
|
|
||||||
dlltool --export-all-symbols --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
libldif.def: $(LDAP_LIBDIR)/libldif/*.o
|
|
||||||
dlltool --export-all-symbols --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
liblutil.def: $(LDAP_LIBDIR)/liblutil/*.o
|
|
||||||
dlltool --export-all-symbols --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
slapd.def: $(OBJS) version.o
|
|
||||||
dlltool --export-all-symbols --exclude-symbols main,ServiceMain@8 --output-def $@ `ls $^ | grep -v test`
|
|
||||||
|
|
||||||
# We don't want to include symbols from dynamic libraries.
|
|
||||||
all.def: $(STATIC_DEFS) $(DYNAMIC_DEFS)
|
|
||||||
cat $(STATIC_DEFS) | grep " @ " | sed -e 's/ @ [0-9]*//' > $@
|
|
||||||
if test "@LIB_LINKAGE@" != "DYN" ; then \
|
|
||||||
cat $(DYNAMIC_DEFS) | grep " @ " | sed -e 's/ @ [0-9]*//' >> $@; \
|
|
||||||
fi
|
|
||||||
echo EXPORTS > tmp.def
|
|
||||||
sort $@ >> tmp.def
|
|
||||||
rm -f $@
|
|
||||||
dlltool --input-def tmp.def --output-def $@
|
|
||||||
rm -f tmp.def
|
|
||||||
|
|
||||||
DUMMYTMP = symdummytmp.c
|
|
||||||
|
|
||||||
symdummy.c: all.def $(ALL_DEFS)
|
|
||||||
rm -f $@
|
|
||||||
echo "static void never_called() {" > $(DUMMYTMP)
|
|
||||||
cat $< | grep " @ " | while read line; \
|
|
||||||
do \
|
do \
|
||||||
set dummy $$line; \
|
set dummy $$line; \
|
||||||
case $$# in \
|
case $$# in \
|
||||||
5) \
|
3) \
|
||||||
echo "int $$2();" >> $@; \
|
echo "int $$2();" >> $@; \
|
||||||
echo "$$2();" >> $(DUMMYTMP); \
|
echo "$$2();" >> $@.tmp; \
|
||||||
;; \
|
;; \
|
||||||
6) \
|
4) \
|
||||||
echo "extern int $$2;" >> $@; \
|
echo "extern int $$2;" >> $@; \
|
||||||
echo "$$2 = 0;" >> $(DUMMYTMP); \
|
echo "$$2 = 0;" >> $@.tmp; \
|
||||||
;; \
|
;; \
|
||||||
esac; \
|
esac; \
|
||||||
done
|
done; \
|
||||||
echo "" >> $@
|
echo "" >> $@; \
|
||||||
echo "}" >> $(DUMMYTMP)
|
echo "}" >> $@.tmp; \
|
||||||
cat $(DUMMYTMP) >> $@
|
cat $@.tmp >> $@; \
|
||||||
rm -f $(DUMMYTMP)
|
$(RM) $@.tmp
|
||||||
|
|
||||||
symdummy.o: symdummy.c
|
libslapd.a: symdummy.o
|
||||||
$(CC) $(CFLAGS) -c $<
|
dlltool --dllname slapd.exe --input-def slapd.def --output-lib $@
|
||||||
|
|
||||||
SLAPD_OBJS = $(OBJS) version.o symdummy.o
|
slapd.exp: libslapd.a
|
||||||
|
@echo $(LTLINK) -Wl,--base-file,slapd.base -o slapd \
|
||||||
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS); \
|
||||||
|
$(LTLINK) -Wl,--base-file,slapd.base -o slapd \
|
||||||
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS)
|
||||||
|
$(RM) slapd.exe
|
||||||
|
@echo dlltool --dllname slapd.exe --input-def slapd.def \
|
||||||
|
--base-file slapd.base --output-exp $@; \
|
||||||
|
dlltool --dllname slapd.exe --input-def slapd.def \
|
||||||
|
--base-file slapd.base --output-exp $@; \
|
||||||
|
echo $(LTLINK) -Wl,--base-file,slapd.base -o slapd $@ \
|
||||||
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS); \
|
||||||
|
$(LTLINK) -Wl,--base-file,slapd.base -o slapd $@ \
|
||||||
|
$(OBJS) symdummy.o version.o $(LIBS) $(WRAP_LIBS)
|
||||||
|
$(RM) slapd.exe
|
||||||
|
@echo dlltool --dllname slapd.exe --input-def slapd.def \
|
||||||
|
--base-file slapd.base --output-exp $@; \
|
||||||
|
dlltool --dllname slapd.exe --input-def slapd.def \
|
||||||
|
--base-file slapd.base --output-exp $@
|
||||||
|
|
||||||
slapd.exp: libbackends.a all.def $(SLAPD_OBJS)
|
slapd: $(SLAPD_DEPENDS)
|
||||||
$(LTLINK) -o slapd $(SLAPD_OBJS) $(LIBS) $(WRAP_LIBS) -Wl,--base-file,slapd.base
|
$(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) $(WRAP_LIBS)
|
||||||
rm -f slapd.exe
|
@msg="building dynamic backends..."; \
|
||||||
dlltool --dllname slapd.exe --input-def all.def --base-file slapd.base --output-exp $@
|
for i in back-*; do \
|
||||||
$(LTLINK) -o slapd $(SLAPD_OBJS) $(LIBS) $(WRAP_LIBS) $@ -Wl,--base-file,slapd.base
|
if test -d $$i -a -f $$i/Makefile ; then \
|
||||||
rm -f slapd.exe
|
grep '^BUILD_MOD[ ]*=[ ]*mod[ ]*$$' $$i/Makefile \
|
||||||
dlltool --dllname slapd.exe --input-def all.def --base-file slapd.base --output-exp $@
|
> /dev/null 2>&1; \
|
||||||
|
if test $$? = 0; then \
|
||||||
libslapd.a: all.def
|
if test -n "$$msg"; then \
|
||||||
dlltool --dllname slapd.exe --input-def $< --output-lib $@
|
echo ""; echo "$$msg"; \
|
||||||
|
msg=""; \
|
||||||
slapd: libbackends.a version.o $(@PLAT@_EXP) $(@PLAT@_DUMMY)
|
fi; \
|
||||||
$(LTLINK) -o $@ $(@PLAT@_EXP) $(@PLAT@_DUMMY) $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
echo ""; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
|
||||||
(cd tools; $(MAKE) $(MFLAGS) all)
|
( cd $$i; $(MAKE) $(MFLAGS) all ); \
|
||||||
|
if test $$? != 0 ; then exit 1; fi ; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
echo ""
|
||||||
|
cd tools; $(MAKE) $(MFLAGS) all
|
||||||
|
|
||||||
sslapd: version.o
|
sslapd: version.o
|
||||||
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
$(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS)
|
||||||
|
|
||||||
.backend: $(@PLAT@_IMPLIB) FORCE
|
#
|
||||||
@for i in back-*; do \
|
# In Windows, dynamic backends have to be built after slapd. For this
|
||||||
if test -d $$i -a -f $$i/Makefile ; then \
|
# reason, we only build static backends now and dynamic backends later.
|
||||||
echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
|
#
|
||||||
( cd $$i; $(MAKE) $(MFLAGS) all ); \
|
.backend: FORCE
|
||||||
if test $$? != 0 ; then exit 1; fi ; \
|
@echo ""; echo "building static backends..."; \
|
||||||
|
for i in back-*; do \
|
||||||
|
if test -d $$i -a -f $$i/Makefile ; then \
|
||||||
|
grep '^BUILD_MOD[ ]*=[ ]*mod[ ]*$$' $$i/Makefile \
|
||||||
|
> /dev/null 2>&1; \
|
||||||
|
if test $$? != 0; then \
|
||||||
|
echo ""; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \
|
||||||
|
( cd $$i; $(MAKE) $(MFLAGS) all ); \
|
||||||
|
if test $$? != 0 ; then exit 1; fi ; \
|
||||||
fi; \
|
fi; \
|
||||||
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
echo " "
|
echo ""
|
||||||
|
|
||||||
libbackends.a: .backend
|
libbackends.a: .backend
|
||||||
@$(RM) -r tmp
|
@$(RM) -r tmp
|
||||||
|
|
@ -178,13 +273,14 @@ libbackends.a: .backend
|
||||||
( \
|
( \
|
||||||
cd tmp; \
|
cd tmp; \
|
||||||
$(AR) x ../$$i; \
|
$(AR) x ../$$i; \
|
||||||
pre=`echo $$i | sed -e 's/\/.*$$//' -e 's/back-//'`; \
|
pre=`echo $$i | $(SED) -e 's/\/.*$$//' -e 's/back-//'`; \
|
||||||
for j in *.o; do \
|
for j in *.o; do \
|
||||||
mv $$j $${pre}$$j; \
|
mv $$j $${pre}$$j; \
|
||||||
done; \
|
done; \
|
||||||
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
|
$(AR) ruv libbackends.a *.o 2>&1 | grep -v truncated; \
|
||||||
$(RM) *.o __.SYMDEF ________64ELEL_ ; \
|
$(RM) *.o __.SYMDEF ________64ELEL_ ; \
|
||||||
echo "added backend library $$i"; \
|
echo "added backend library $$i"; \
|
||||||
|
echo ""; \
|
||||||
); \
|
); \
|
||||||
done
|
done
|
||||||
@mv -f tmp/libbackends.a ./libbackends.a
|
@mv -f tmp/libbackends.a ./libbackends.a
|
||||||
|
|
@ -192,7 +288,7 @@ libbackends.a: .backend
|
||||||
@if test ! -z "$(RANLIB)" ; then \
|
@if test ! -z "$(RANLIB)" ; then \
|
||||||
$(RANLIB) libbackends.a; \
|
$(RANLIB) libbackends.a; \
|
||||||
fi
|
fi
|
||||||
@ls -l libbackends.a
|
@ls -l libbackends.a; echo ""
|
||||||
|
|
||||||
version.c: $(OBJS) $(SLAPD_LIBDEPEND)
|
version.c: $(OBJS) $(SLAPD_LIBDEPEND)
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
|
|
@ -236,20 +332,30 @@ install-slapd: FORCE
|
||||||
-$(MKDIR) $(DESTDIR)$(localstatedir)
|
-$(MKDIR) $(DESTDIR)$(localstatedir)
|
||||||
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
|
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
|
||||||
slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
|
slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
|
||||||
@if test ! -z "$(SLAPD_MODULES)" ; then \
|
@for i in back-* shell-backends tools; do \
|
||||||
for i in back-* shell-backends tools; do \
|
if test -d $$i -a -f $$i/Makefile ; then \
|
||||||
if test -d $$i -a -f $$i/Makefile ; then \
|
echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
|
||||||
echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
|
( cd $$i; $(MAKE) $(MFLAGS) install ); \
|
||||||
( cd $$i; $(MAKE) $(MFLAGS) install ); \
|
if test $$? != 0 ; then exit 1; fi ; \
|
||||||
if test $$? != 0 ; then exit 1; fi ; \
|
fi; \
|
||||||
fi; \
|
done
|
||||||
done; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
all-cffiles: slapd
|
all-cffiles: slapd
|
||||||
$(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' \
|
@if test $(PLAT) = NT; then \
|
||||||
-e 's;%LOCALSTATEDIR%;$(localstatedir);' \
|
sysconfdir=`cygpath -w $(sysconfdir) | \
|
||||||
-e 's;%MODULEDIR%;$(moduledir);' \
|
$(SED) -e 's/\\\\/\\\\\\\\/g'`; \
|
||||||
|
localstatedir=`cygpath -w $(localstatedir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\/g'`; \
|
||||||
|
moduledir=`cygpath -w $(moduledir) | \
|
||||||
|
$(SED) -e 's/\\\\/\\\\\\\\/g'`; \
|
||||||
|
else \
|
||||||
|
sysconfdir=$(sysconfdir); \
|
||||||
|
localstatedir=$(localstatedir); \
|
||||||
|
moduledir=$(moduledir); \
|
||||||
|
fi; \
|
||||||
|
$(SED) -e "s;%SYSCONFDIR%;$$sysconfdir;" \
|
||||||
|
-e "s;%LOCALSTATEDIR%;$$localstatedir;" \
|
||||||
|
-e "s;%MODULEDIR%;$$moduledir;" \
|
||||||
$(srcdir)/slapd.conf > slapd.conf.tmp ; \
|
$(srcdir)/slapd.conf > slapd.conf.tmp ; \
|
||||||
touch all-cffiles
|
touch all-cffiles
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-bdb"
|
BUILD_OPT = "--enable-bdb"
|
||||||
BUILD_MOD = @BUILD_BDB@
|
BUILD_MOD = @BUILD_BDB@
|
||||||
LINKAGE = @BUILD_BDB_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_BDB_DYNAMIC@
|
||||||
|
|
||||||
DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_BDB@_DEFS)
|
||||||
|
|
||||||
# TODO
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
#NT_mod_DYN_MODDEFS =
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
#NT_mod_STAT_MODDEFS =
|
|
||||||
|
|
||||||
NT_yes_DYN_MODDEFS = $(DYN_DEFS)
|
|
||||||
NT_yes_STAT_MODDEFS =
|
|
||||||
|
|
||||||
MODDEFS = $(@PLAT@_@BUILD_LDBM@_@LIB_LINKAGE@_MODDEFS)
|
|
||||||
|
|
||||||
LIBBASE = back_bdb
|
LIBBASE = back_bdb
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-dnssrv"
|
BUILD_OPT = "--enable-dnssrv"
|
||||||
BUILD_MOD = @BUILD_DNSSRV@
|
BUILD_MOD = @BUILD_DNSSRV@
|
||||||
LINKAGE = @BUILD_DNSSRV_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_DNSSRV_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_DNSSRV@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_dnssrv
|
LIBBASE = back_dnssrv
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-ldap"
|
BUILD_OPT = "--enable-ldap"
|
||||||
BUILD_MOD = @BUILD_LDAP@
|
BUILD_MOD = @BUILD_LDAP@
|
||||||
LINKAGE = @BUILD_LDAP_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_LDAP_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_LDAP@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_ldap
|
LIBBASE = back_ldap
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,30 @@
|
||||||
# $OpenLDAP$
|
# $OpenLDAP$
|
||||||
|
|
||||||
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c id2entry.c \
|
SRCS = idl.c add.c search.c cache.c dbcache.c dn2id.c entry.c \
|
||||||
index.c id2children.c nextid.c abandon.c compare.c group.c \
|
id2entry.c index.c id2children.c nextid.c abandon.c \
|
||||||
modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
|
compare.c group.c modify.c modrdn.c delete.c init.c \
|
||||||
filterindex.c unbind.c close.c alias.c tools.c key.c \
|
config.c bind.c attr.c filterindex.c unbind.c close.c \
|
||||||
extended.c passwd.c sasl.c referral.c attribute.c
|
alias.c tools.c key.c extended.c passwd.c sasl.c \
|
||||||
OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo id2entry.lo \
|
referral.c attribute.c
|
||||||
index.lo id2children.lo nextid.lo abandon.lo compare.lo group.lo \
|
OBJS = idl.lo add.lo search.lo cache.lo dbcache.lo dn2id.lo entry.lo \
|
||||||
modify.lo modrdn.lo delete.lo init.lo config.lo bind.lo attr.lo \
|
id2entry.lo index.lo id2children.lo nextid.lo abandon.lo \
|
||||||
filterindex.lo unbind.lo close.lo alias.lo tools.lo key.lo \
|
compare.lo group.lo modify.lo modrdn.lo delete.lo init.lo \
|
||||||
extended.lo passwd.lo sasl.lo referral.lo attribute.lo
|
config.lo bind.lo attr.lo filterindex.lo unbind.lo close.lo \
|
||||||
|
alias.lo tools.lo key.lo extended.lo passwd.lo sasl.lo \
|
||||||
|
referral.lo attribute.lo
|
||||||
|
|
||||||
LDAP_INCDIR= ../../../include
|
LDAP_INCDIR= ../../../include
|
||||||
LDAP_LIBDIR= ../../../libraries
|
LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-ldbm"
|
BUILD_OPT = "--enable-ldbm"
|
||||||
BUILD_MOD = @BUILD_LDBM@
|
BUILD_MOD = @BUILD_LDBM@
|
||||||
LINKAGE = @BUILD_LDBM_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_LDBM_DYNAMIC@
|
||||||
|
|
||||||
DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_LDBM@_DEFS)
|
||||||
|
|
||||||
# TODO
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
#NT_mod_DYN_MODDEFS =
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
#NT_mod_STAT_MODDEFS =
|
|
||||||
|
|
||||||
NT_yes_DYN_MODDEFS = $(DYN_DEFS)
|
|
||||||
NT_yes_STAT_MODDEFS =
|
|
||||||
|
|
||||||
MODDEFS = $(@PLAT@_@BUILD_LDBM@_@LIB_LINKAGE@_MODDEFS)
|
|
||||||
|
|
||||||
LIBBASE = back_ldbm
|
LIBBASE = back_ldbm
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-meta"
|
BUILD_OPT = "--enable-meta"
|
||||||
BUILD_MOD = @BUILD_META@
|
BUILD_MOD = @BUILD_META@
|
||||||
LINKAGE = @BUILD_META_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_META_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_META@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_meta
|
LIBBASE = back_meta
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-monitor"
|
BUILD_OPT = "--enable-monitor"
|
||||||
BUILD_MOD = @BUILD_MONITOR@
|
BUILD_MOD = @BUILD_MONITOR@
|
||||||
LINKAGE = @BUILD_MONITOR_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_MONITOR_DYNAMIC@
|
||||||
|
|
||||||
DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_MONITOR@_DEFS)
|
||||||
|
|
||||||
# TODO
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
#NT_mod_DYN_MODDEFS =
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
#NT_mod_STAT_MODDEFS =
|
|
||||||
|
|
||||||
NT_yes_DYN_MODDEFS = $(DYN_DEFS)
|
|
||||||
NT_yes_STAT_MODDEFS =
|
|
||||||
|
|
||||||
MODDEFS = $(@PLAT@_@BUILD_MONITOR@_@LIB_LINKAGE@_MODDEFS)
|
|
||||||
|
|
||||||
LIBBASE = back_monitor
|
LIBBASE = back_monitor
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-passwd"
|
BUILD_OPT = "--enable-passwd"
|
||||||
BUILD_MOD = @BUILD_PASSWD@
|
BUILD_MOD = @BUILD_PASSWD@
|
||||||
LINKAGE = @BUILD_PASSWD_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_PASSWD_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_PASSWD@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_passwd
|
LIBBASE = back_passwd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,16 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-perl"
|
BUILD_OPT = "--enable-perl"
|
||||||
BUILD_MOD = @BUILD_PERL@
|
BUILD_MOD = @BUILD_PERL@
|
||||||
LINKAGE = @BUILD_PERL_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_PERL_DYNAMIC@
|
||||||
PERL_CPPFLAGS = @PERL_CPPFLAGS@
|
PERL_CPPFLAGS = @PERL_CPPFLAGS@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_PERL@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_perl
|
LIBBASE = back_perl
|
||||||
MODLIBS = @MOD_PERL_LDFLAGS@
|
|
||||||
|
|
||||||
XINCPATH = -I.. -I$(srcdir)/..
|
XINCPATH = -I.. -I$(srcdir)/..
|
||||||
XDEFS = $(PERL_CPPFLAGS) $(MODULES_CPPFLAGS)
|
XDEFS = $(PERL_CPPFLAGS) $(MODULES_CPPFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,23 @@
|
||||||
## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
|
## Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
|
||||||
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||||
|
|
||||||
SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \
|
SRCS = init.c config.c fork.c search.c bind.c unbind.c add.c \
|
||||||
modify.c modrdn.c compare.c abandon.c result.c
|
delete.c modify.c modrdn.c compare.c abandon.c result.c
|
||||||
OBJS = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo delete.lo \
|
OBJS = init.lo config.lo fork.lo search.lo bind.lo unbind.lo add.lo \
|
||||||
modify.lo modrdn.lo compare.lo abandon.lo result.lo
|
delete.lo modify.lo modrdn.lo compare.lo abandon.lo result.lo
|
||||||
|
|
||||||
LDAP_INCDIR= ../../../include
|
LDAP_INCDIR= ../../../include
|
||||||
LDAP_LIBDIR= ../../../libraries
|
LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-shell"
|
BUILD_OPT = "--enable-shell"
|
||||||
BUILD_MOD = @BUILD_SHELL@
|
BUILD_MOD = @BUILD_SHELL@
|
||||||
LINKAGE = @BUILD_SHELL_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_SHELL_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_SHELL@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_shell
|
LIBBASE = back_shell
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,13 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-sql"
|
BUILD_OPT = "--enable-sql"
|
||||||
BUILD_MOD = @BUILD_SQL@
|
BUILD_MOD = @BUILD_SQL@
|
||||||
LINKAGE = @BUILD_SQL_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_SQL_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_SQL@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_sql
|
LIBBASE = back_sql
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,15 @@ LDAP_LIBDIR= ../../../libraries
|
||||||
|
|
||||||
BUILD_OPT = "--enable-tcl"
|
BUILD_OPT = "--enable-tcl"
|
||||||
BUILD_MOD = @BUILD_TCL@
|
BUILD_MOD = @BUILD_TCL@
|
||||||
LINKAGE = @BUILD_TCL_DYNAMIC@
|
BUILD_MOD_DYNAMIC = @BUILD_TCL_DYNAMIC@
|
||||||
|
|
||||||
|
mod_DEFS = -DSLAPD_IMPORT
|
||||||
|
MOD_DEFS = $(@BUILD_TCL@_DEFS)
|
||||||
|
|
||||||
|
shared_LDAP_LIBS = $(LDAP_LIBPATH) -lldap_r -llber
|
||||||
|
NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
|
||||||
|
|
||||||
LIBBASE = back_tcl
|
LIBBASE = back_tcl
|
||||||
MODLIBS = @MOD_TCL_LIB@
|
|
||||||
|
|
||||||
XDEFS = $(MODULES_CPPFLAGS)
|
XDEFS = $(MODULES_CPPFLAGS)
|
||||||
XINCPATH = -I.. -I$(srcdir)/..
|
XINCPATH = -I.. -I$(srcdir)/..
|
||||||
|
|
@ -36,3 +41,4 @@ all-local-lib: ../.backend
|
||||||
|
|
||||||
../.backend: lib$(LIBBASE).a
|
../.backend: lib$(LIBBASE).a
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,40 +18,48 @@
|
||||||
#include "slap.h"
|
#include "slap.h"
|
||||||
#include "lutil.h"
|
#include "lutil.h"
|
||||||
|
|
||||||
#ifdef SLAPD_BDB
|
/*
|
||||||
|
* If a module is configured as dynamic, its header should not
|
||||||
|
* get included into slapd. While this is a general rule and does
|
||||||
|
* not have much of an effect in UNIX, this rule should be adhered
|
||||||
|
* to for Windows, where dynamic object code should not be implicitly
|
||||||
|
* imported into slapd without appropriate __declspec(dllimport) directives.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
|
||||||
#include "back-bdb/external.h"
|
#include "back-bdb/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_DNSSRV
|
#if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
|
||||||
#include "back-dnssrv/external.h"
|
#include "back-dnssrv/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_LDAP
|
#if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
|
||||||
#include "back-ldap/external.h"
|
#include "back-ldap/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_LDBM
|
#if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
|
||||||
#include "back-ldbm/external.h"
|
#include "back-ldbm/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_META
|
#if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
|
||||||
#include "back-meta/external.h"
|
#include "back-meta/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_MONITOR
|
#if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
|
||||||
#include "back-monitor/external.h"
|
#include "back-monitor/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_PASSWD
|
#if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
|
||||||
#include "back-passwd/external.h"
|
#include "back-passwd/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_PERL
|
#if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
|
||||||
#include "back-perl/external.h"
|
#include "back-perl/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_SHELL
|
#if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
|
||||||
#include "back-shell/external.h"
|
#include "back-shell/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_TCL
|
#if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
|
||||||
#include "back-tcl/external.h"
|
#include "back-tcl/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_SQL
|
#if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
|
||||||
#include "back-sql/external.h"
|
#include "back-sql/external.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SLAPD_PRIVATE
|
#if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
|
||||||
#include "private/external.h"
|
#include "private/external.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
#include <ac/unistd.h>
|
#include <ac/unistd.h>
|
||||||
|
|
||||||
#include "ldap_pvt.h"
|
#include "ldap_pvt.h"
|
||||||
|
#include "ldap_pvt_thread.h"
|
||||||
#include "lutil.h"
|
#include "lutil.h"
|
||||||
#include "slap.h"
|
#include "slap.h"
|
||||||
|
|
||||||
|
|
@ -64,13 +65,6 @@ static int waking;
|
||||||
do { if (w) tcp_write( wake_sds[1], "0", 1 ); } while(0)
|
do { if (w) tcp_write( wake_sds[1], "0", 1 ); } while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NT_SERVICE_MANAGER
|
|
||||||
/* in nt_main.c */
|
|
||||||
/* externs are frowned upon, but so is NT :-) */
|
|
||||||
extern ldap_pvt_thread_cond_t started_event;
|
|
||||||
extern int is_NT_Service;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_WINSOCK
|
#ifndef HAVE_WINSOCK
|
||||||
static
|
static
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,6 @@ static RETSIGTYPE wait4child( int sig );
|
||||||
#define MAIN_RETURN(x) return
|
#define MAIN_RETURN(x) return
|
||||||
struct sockaddr_in bind_addr;
|
struct sockaddr_in bind_addr;
|
||||||
|
|
||||||
/* in nt_main.c */
|
|
||||||
LDAP_LUTIL_V(SERVICE_STATUS) SLAPDServiceStatus;
|
|
||||||
LDAP_LUTIL_V(SERVICE_STATUS_HANDLE) hSLAPDServiceStatus;
|
|
||||||
/* externs are frowned upon, but so is NT :-) */
|
|
||||||
extern ldap_pvt_thread_cond_t started_event, stopped_event;
|
|
||||||
extern int is_NT_Service;
|
|
||||||
|
|
||||||
void CommenceStartupProcessing( LPCTSTR serverName,
|
void CommenceStartupProcessing( LPCTSTR serverName,
|
||||||
void(*stopper)(int));
|
void(*stopper)(int));
|
||||||
void ReportSlapdShutdownComplete( void );
|
void ReportSlapdShutdownComplete( void );
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ac/string.h>
|
#include <ac/string.h>
|
||||||
#include "slap.h"
|
#include "slap.h"
|
||||||
|
#include "lutil.h"
|
||||||
|
|
||||||
#ifdef HAVE_NT_SERVICE_MANAGER
|
#ifdef HAVE_NT_SERVICE_MANAGER
|
||||||
|
|
||||||
|
|
@ -25,7 +26,6 @@ int main( int argc, LPTSTR *argv )
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
char filename[MAX_PATH], *fname_start;
|
char filename[MAX_PATH], *fname_start;
|
||||||
extern int is_NT_Service;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Because the service was registered as SERVICE_WIN32_OWN_PROCESS,
|
* Because the service was registered as SERVICE_WIN32_OWN_PROCESS,
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
LDAP_BEGIN_DECL
|
LDAP_BEGIN_DECL
|
||||||
|
|
||||||
LDAP_SLAPD_F( int ) schema_init_done;
|
LDAP_SLAPD_V( int ) schema_init_done;
|
||||||
LDAP_SLAPD_F( struct slap_internal_schema ) slap_schema;
|
LDAP_SLAPD_V( struct slap_internal_schema ) slap_schema;
|
||||||
|
|
||||||
LDAP_SLAPD_F( int ) slap_valid_descr( const char * );
|
LDAP_SLAPD_F( int ) slap_valid_descr( const char * );
|
||||||
|
|
||||||
|
|
@ -334,7 +334,7 @@ LDAP_SLAPD_F (void) build_new_dn LDAP_P(( char ** new_dn,
|
||||||
* entry.c
|
* entry.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern const Entry slap_entry_root;
|
LDAP_SLAPD_V (const Entry) slap_entry_root;
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) entry_destroy LDAP_P((void));
|
LDAP_SLAPD_F (int) entry_destroy LDAP_P((void));
|
||||||
|
|
||||||
|
|
@ -468,7 +468,7 @@ LDAP_SLAPD_F (void) *module_resolve LDAP_P((
|
||||||
/*
|
/*
|
||||||
* controls.c
|
* controls.c
|
||||||
*/
|
*/
|
||||||
LDAP_SLAPD_F (char *) supportedControls[];
|
LDAP_SLAPD_V (char *) supportedControls[];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mra.c
|
* mra.c
|
||||||
|
|
@ -853,8 +853,8 @@ LDAP_SLAPD_F (int) slap_passwd_parse(
|
||||||
* kerberos.c
|
* kerberos.c
|
||||||
*/
|
*/
|
||||||
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
|
#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
|
||||||
extern char *ldap_srvtab;
|
LDAP_SLAPD_V (char) *ldap_srvtab;
|
||||||
LDAP_SLAPD_F (int) krbv4_ldap_auth();
|
LDAP_SLAPD_V (int) krbv4_ldap_auth();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -863,65 +863,65 @@ LDAP_SLAPD_F (int) krbv4_ldap_auth();
|
||||||
#define SLAP_SB_MAX_INCOMING_DEFAULT ((1<<18) - 1)
|
#define SLAP_SB_MAX_INCOMING_DEFAULT ((1<<18) - 1)
|
||||||
#define SLAP_SB_MAX_INCOMING_AUTH ((1<<24) - 1)
|
#define SLAP_SB_MAX_INCOMING_AUTH ((1<<24) - 1)
|
||||||
|
|
||||||
LDAP_SLAPD_F (ber_len_t) sockbuf_max_incoming;
|
LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming;
|
||||||
LDAP_SLAPD_F (ber_len_t) sockbuf_max_incoming_auth;
|
LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming_auth;
|
||||||
|
|
||||||
LDAP_SLAPD_F (slap_mask_t) global_restrictops;
|
LDAP_SLAPD_V (slap_mask_t) global_restrictops;
|
||||||
LDAP_SLAPD_F (slap_mask_t) global_allows;
|
LDAP_SLAPD_V (slap_mask_t) global_allows;
|
||||||
LDAP_SLAPD_F (slap_mask_t) global_disallows;
|
LDAP_SLAPD_V (slap_mask_t) global_disallows;
|
||||||
LDAP_SLAPD_F (slap_mask_t) global_requires;
|
LDAP_SLAPD_V (slap_mask_t) global_requires;
|
||||||
LDAP_SLAPD_F (slap_ssf_set_t) global_ssf_set;
|
LDAP_SLAPD_V (slap_ssf_set_t) global_ssf_set;
|
||||||
|
|
||||||
LDAP_SLAPD_F (struct berval **) default_referral;
|
LDAP_SLAPD_V (struct berval **) default_referral;
|
||||||
LDAP_SLAPD_F (char *) replogfile;
|
LDAP_SLAPD_V (char *) replogfile;
|
||||||
LDAP_SLAPD_F (const char) Versionstr[];
|
LDAP_SLAPD_V (const char) Versionstr[];
|
||||||
LDAP_SLAPD_F (struct slap_limits_set) deflimit;
|
LDAP_SLAPD_V (struct slap_limits_set) deflimit;
|
||||||
LDAP_SLAPD_F (int) g_argc;
|
LDAP_SLAPD_V (int) g_argc;
|
||||||
LDAP_SLAPD_F (slap_access_t) global_default_access;
|
LDAP_SLAPD_V (slap_access_t) global_default_access;
|
||||||
LDAP_SLAPD_F (int) global_lastmod;
|
LDAP_SLAPD_V (int) global_lastmod;
|
||||||
LDAP_SLAPD_F (int) global_idletimeout;
|
LDAP_SLAPD_V (int) global_idletimeout;
|
||||||
LDAP_SLAPD_F (int) global_schemacheck;
|
LDAP_SLAPD_V (int) global_schemacheck;
|
||||||
LDAP_SLAPD_F (char) *global_host;
|
LDAP_SLAPD_V (char) *global_host;
|
||||||
LDAP_SLAPD_F (char) *global_realm;
|
LDAP_SLAPD_V (char) *global_realm;
|
||||||
LDAP_SLAPD_F (int) sasl_external_x509dn_convert;
|
LDAP_SLAPD_V (int) sasl_external_x509dn_convert;
|
||||||
LDAP_SLAPD_F (char) *default_passwd_hash;
|
LDAP_SLAPD_V (char) *default_passwd_hash;
|
||||||
LDAP_SLAPD_F (int) lber_debug;
|
LDAP_SLAPD_V (int) lber_debug;
|
||||||
LDAP_SLAPD_F (int) ldap_syslog;
|
LDAP_SLAPD_V (int) ldap_syslog;
|
||||||
LDAP_SLAPD_F (char *) default_search_base;
|
LDAP_SLAPD_V (char *) default_search_base;
|
||||||
LDAP_SLAPD_F (char *) default_search_nbase;
|
LDAP_SLAPD_V (char *) default_search_nbase;
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) nSaslRegexp;
|
LDAP_SLAPD_V (int) nSaslRegexp;
|
||||||
LDAP_SLAPD_F (SaslRegexp_t*) SaslRegexp;
|
LDAP_SLAPD_V (SaslRegexp_t*) SaslRegexp;
|
||||||
|
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) num_sent_mutex;
|
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) num_sent_mutex;
|
||||||
LDAP_SLAPD_F (long) num_bytes_sent;
|
LDAP_SLAPD_V (long) num_bytes_sent;
|
||||||
LDAP_SLAPD_F (long) num_pdu_sent;
|
LDAP_SLAPD_V (long) num_pdu_sent;
|
||||||
LDAP_SLAPD_F (long) num_entries_sent;
|
LDAP_SLAPD_V (long) num_entries_sent;
|
||||||
LDAP_SLAPD_F (long) num_refs_sent;
|
LDAP_SLAPD_V (long) num_refs_sent;
|
||||||
|
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) num_ops_mutex;
|
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) num_ops_mutex;
|
||||||
LDAP_SLAPD_F (long) num_ops_completed;
|
LDAP_SLAPD_V (long) num_ops_completed;
|
||||||
LDAP_SLAPD_F (long) num_ops_initiated;
|
LDAP_SLAPD_V (long) num_ops_initiated;
|
||||||
|
|
||||||
LDAP_SLAPD_F (char *) slapd_pid_file;
|
LDAP_SLAPD_V (char *) slapd_pid_file;
|
||||||
LDAP_SLAPD_F (char *) slapd_args_file;
|
LDAP_SLAPD_V (char *) slapd_args_file;
|
||||||
LDAP_SLAPD_F (char) **g_argv;
|
LDAP_SLAPD_V (char) **g_argv;
|
||||||
LDAP_SLAPD_F (time_t) starttime;
|
LDAP_SLAPD_V (time_t) starttime;
|
||||||
|
|
||||||
/* use time(3) -- no mutex */
|
/* use time(3) -- no mutex */
|
||||||
#define slap_get_time() time( NULL )
|
#define slap_get_time() time( NULL )
|
||||||
|
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_pool_t) connection_pool;
|
LDAP_SLAPD_V (ldap_pvt_thread_pool_t) connection_pool;
|
||||||
|
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) entry2str_mutex;
|
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) entry2str_mutex;
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) replog_mutex;
|
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) replog_mutex;
|
||||||
|
|
||||||
#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
|
#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) passwd_mutex;
|
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) passwd_mutex;
|
||||||
#endif
|
#endif
|
||||||
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) gmtime_mutex;
|
LDAP_SLAPD_V (ldap_pvt_thread_mutex_t) gmtime_mutex;
|
||||||
|
|
||||||
LDAP_SLAPD_F (AccessControl *) global_acl;
|
LDAP_SLAPD_V (AccessControl *) global_acl;
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) slap_init LDAP_P((int mode, const char* name));
|
LDAP_SLAPD_F (int) slap_init LDAP_P((int mode, const char* name));
|
||||||
LDAP_SLAPD_F (int) slap_startup LDAP_P(( Backend *be ));
|
LDAP_SLAPD_F (int) slap_startup LDAP_P(( Backend *be ));
|
||||||
|
|
@ -968,7 +968,7 @@ LDAP_SLAPD_F (int) do_unbind LDAP_P((Connection *conn, Operation *op));
|
||||||
LDAP_SLAPD_F (int) do_extended LDAP_P((Connection *conn, Operation *op));
|
LDAP_SLAPD_F (int) do_extended LDAP_P((Connection *conn, Operation *op));
|
||||||
|
|
||||||
|
|
||||||
LDAP_SLAPD_F (ber_socket_t) dtblsize;
|
LDAP_SLAPD_V (ber_socket_t) dtblsize;
|
||||||
|
|
||||||
LDAP_END_DECL
|
LDAP_END_DECL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,10 @@
|
||||||
*/
|
*/
|
||||||
typedef char **(*SET_GATHER) (void *cookie, char *name, char *attr);
|
typedef char **(*SET_GATHER) (void *cookie, char *name, char *attr);
|
||||||
|
|
||||||
long set_size (char **set);
|
LDAP_SLAPD_F (long) set_size (char **set);
|
||||||
void set_dispose (char **set);
|
LDAP_SLAPD_F (void) set_dispose (char **set);
|
||||||
|
|
||||||
int set_filter (SET_GATHER gatherer, void *cookie, char *filter, char *user, char *this, char ***results);
|
LDAP_SLAPD_F (int)
|
||||||
|
set_filter (SET_GATHER gatherer, void *cookie, char *filter,
|
||||||
|
char *user, char *this, char ***results);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ LDAP_BEGIN_DECL
|
||||||
|
|
||||||
#define SLAPD_TOP_OID "2.5.6.0"
|
#define SLAPD_TOP_OID "2.5.6.0"
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) slap_debug;
|
LDAP_SLAPD_V (int) slap_debug;
|
||||||
|
|
||||||
typedef unsigned long slap_mask_t;
|
typedef unsigned long slap_mask_t;
|
||||||
|
|
||||||
|
|
@ -843,12 +843,12 @@ struct replog_moddn {
|
||||||
typedef struct slap_backend_info BackendInfo; /* per backend type */
|
typedef struct slap_backend_info BackendInfo; /* per backend type */
|
||||||
typedef struct slap_backend_db BackendDB; /* per backend database */
|
typedef struct slap_backend_db BackendDB; /* per backend database */
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) nBackendInfo;
|
LDAP_SLAPD_V (int) nBackendInfo;
|
||||||
LDAP_SLAPD_F (int) nBackendDB;
|
LDAP_SLAPD_V (int) nBackendDB;
|
||||||
LDAP_SLAPD_F (BackendInfo *) backendInfo;
|
LDAP_SLAPD_V (BackendInfo *) backendInfo;
|
||||||
LDAP_SLAPD_F (BackendDB *) backendDB;
|
LDAP_SLAPD_V (BackendDB *) backendDB;
|
||||||
|
|
||||||
LDAP_SLAPD_F (int) slapMode;
|
LDAP_SLAPD_V (int) slapMode;
|
||||||
#define SLAP_UNDEFINED_MODE 0x0000
|
#define SLAP_UNDEFINED_MODE 0x0000
|
||||||
#define SLAP_SERVER_MODE 0x0001
|
#define SLAP_SERVER_MODE 0x0001
|
||||||
#define SLAP_TOOL_MODE 0x0002
|
#define SLAP_TOOL_MODE 0x0002
|
||||||
|
|
|
||||||
|
|
@ -33,21 +33,17 @@ XXXLIBS = $(MODULES_LIBS) $(LTHREAD_LIBS)
|
||||||
|
|
||||||
PROGRAMS=slapadd slapcat slapindex slappasswd
|
PROGRAMS=slapadd slapcat slapindex slappasswd
|
||||||
|
|
||||||
# CPPFLAGS will include the defines for dynamic libs in Mingw32.
|
|
||||||
NT_DYN_DEFS = -DLBER_DECL=dllimport -DLDAP_DECL=dllimport
|
|
||||||
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_DEFS)
|
|
||||||
|
|
||||||
SRCS = mimic.c slapcommon.c \
|
SRCS = mimic.c slapcommon.c \
|
||||||
slapadd.c slapcat.c slapindex.c slappasswd.c
|
slapadd.c slapcat.c slapindex.c slappasswd.c
|
||||||
|
|
||||||
SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
|
SLAPD_OBJS = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
|
||||||
../module.o ../aclparse.o ../filterentry.o \
|
../module.o ../aclparse.o ../filterentry.o ../schema.o \
|
||||||
../schema.o ../schema_check.o ../schema_init.o ../schema_prep.o \
|
../schema_check.o ../schema_init.o ../schema_prep.o \
|
||||||
../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o ../syntax.o \
|
../schemaparse.o ../ad.o ../at.o ../mr.o ../oc.o \
|
||||||
../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
|
../syntax.o ../acl.o ../phonetic.o ../attr.o ../value.o \
|
||||||
../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
|
../entry.o ../dn.o ../filter.o ../str2filter.o ../ava.o \
|
||||||
../controls.o ../kerberos.o ../passwd.o ../index.o \
|
../init.o ../controls.o ../kerberos.o ../passwd.o \
|
||||||
../extended.o ../starttls.o ../sets.o ../mra.o \
|
../index.o ../extended.o ../starttls.o ../sets.o ../mra.o \
|
||||||
../referral.o
|
../referral.o
|
||||||
|
|
||||||
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
|
SLAPOBJS = $(SLAPD_OBJS) slapcommon.o mimic.o
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue