Remove DEFS variables from Makefiles, remove bridge.h.

Rely on portable.h.
This commit is contained in:
Kurt Zeilenga 1998-10-19 23:51:45 +00:00
parent 76ed17f794
commit 490bb72f82
25 changed files with 787 additions and 1189 deletions

View File

@ -9,14 +9,11 @@
#undef DECL_SYS_ERRLIST
/* define if you have berkeley db */
#undef HAVE_BERKELEY_DB2
#undef HAVE_BERKELEY_DB
/* define if you have berkeley db2 */
#undef HAVE_BERKELEY_DB2
/* define if you have Mach CThreads */
#undef HAVE_CTHREADS
/* define if you have crypt */
#undef HAVE_CRYPT
@ -44,6 +41,9 @@
/* define if you have NDBM */
#undef HAVE_NDBM
/* define if you have Mach CThreads */
#undef HAVE_MACH_CTHREADS
/* define if you have a preemptive POSIX Threads implementation */
#undef HAVE_PREEMPTIVE_PTHREADS
@ -56,44 +56,80 @@
/* define if you have -ltermcap */
#undef HAVE_TERMCAP
/* define if you have -lwrap */
#undef HAVE_TCPD
/* define this for connectionless LDAP support */
#undef LDAP_CONNECTIONLESS
/* define this to add debugging code */
#undef LDAP_DEBUG
/* define this for LDAP DNS support */
#undef LDAP_DNS
/* define this to remove -lldap cache support */
#undef LDAP_NOCACHE
/* define this for LDAP referrals support */
#undef LDAP_REFERRALS
/* define this for LDAP User Interface support */
#undef LDAP_LIBUI
/* define this for ACL Group support */
#undef SLAPD_ACLGROUPS
/* define this for Reverse Lookup support */
#undef SLAPD_RLOOKUPS
/* define this for crypt(3) password support */
#undef SLAPD_CRYPT
/* define this to use SLAPD LDBM backend */
#undef SLAPD_LDBM
/* define this for MD5 password support */
#undef SLAPD_MD5
/* define this to use SLAPD passwd backend */
#undef SLAPD_PASSWD
/* define this for phonetic support */
#undef SLAPD_PHONETIC
/* define this for Reverse Lookup support */
#undef SLAPD_RLOOKUPS
/* define this for SHA1 password support */
#undef SLAPD_SHA1
/* define this to use SLAPD shell backend */
/* #undef SLAPD_SHELL */
#undef SLAPD_SHELL
/* define this to use SLAPD passwd backend */
/* #undef SLAPD_PASSWD */
/* define this to use DB2 in native mode */
#undef LDBM_USE_DB2
/* define this to use SLAPD LDBM backend */
/* #undef SLAPD_LDBM */
/* define this to use DB2 in compat185 mode */
#undef LDBM_USE_DB2_COMPAT185
/* define this to use DBBTREE w/ LDBM backend */
/* #undef LDBM_USE_DBBTREE */
#undef LDBM_USE_DBBTREE
/* define this to use DBHASH w/ LDBM backend */
/* #undef LDBM_USE_DBHASH */
#undef LDBM_USE_DBHASH
/* define this to use GDBM w/ LDBM backend */
/* #undef LDBM_USE_GDBM */
#undef LDBM_USE_GDBM
/* define this to use NDBM w/ LDBM backend */
/* #undef LDBM_USE_NDBM */
#undef LDBM_USE_NDBM
/* define this if you want no termcap support */
#undef NO_TERMCAP
/* define this if you want no thread support */
#undef NO_THREADS
/* define this if the thread package is preemptive */
#undef THREAD_PREEMPTIVE
/* Leave that blank line there!! Autoheader needs it. */

View File

@ -69,19 +69,17 @@ LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldif.a $(LDAP_LIBDIR)/libldap.a $(LDAP_LIBDIR
# AutoConfig generated
AC_CC = @CC@
AC_DEFS = @CPPFLAGS@ @DEFS@ @LDAP_DEFS@
AC_DEFS = @CPPFLAGS@ @DEFS@
AC_LIBS = @LDFLAGS@ @LIBS@
AC_CFLAGS = @CFLAGS@
AC_LDFLAGS =
KRB_DEFS = @KRB_DEFS@
KRB_LIBS = @KRB_LIBS@
TERMCAP_DEFS = @TERMCAP_DEFS@
TERMCAP_LIBS = @TERMCAP_LIBS@
# Our Defaults
CC = $(AC_CC)
DEFS = $(LDAP_DEFS) $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS)
DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS)
LIBS = $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)
CFLAGS = $(AC_CFLAGS) $(DEFS) $(DEFINES)

View File

@ -9,7 +9,6 @@ PROGRAMS= ud
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XDEFS = $(TERMCAP_DEFS)
XLIBS = $(TERMCAP_LIBS)
ud : version.o

723
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -164,20 +164,13 @@ fi
AC_MSG_RESULT(done)
## Initialize vars
LDAP_DEFS=
LDAP_LIBS=
LDBM_DEFS=
LDBM_LIBS=
LTHREAD_DEFS=
LTHREAD_LIBS=
LUTIL_DEFS=
LUTIL_LIBS=
LDAPD_DEFS=
LDAPD_LIBS=
SLAPD_DEFS=
SLAPD_LIBS=
SLURPD_DEFS=
SLURPD_LIBS=
BUILD_LDAPD=no
@ -188,9 +181,7 @@ BUILD_LDBM=no
BUILD_PASSWD=no
BUILD_SHELL=no
KRB_DEFS=
KRB_LIBS=
TERMCAP_DEFS=
TERMCAP_LIBS=
dnl ----------------------------------------------------------------
@ -250,7 +241,6 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k5 ; then
AC_DEFINE(HAVE_KERBEROS)
KRB_DEFS="-DKERBEROS"
KRB_LIBS="-lkrb4 -lkrb5 -ldes425"
fi
fi
@ -267,7 +257,6 @@ if test $ol_with_kerberos = auto -o $ol_with_kerberos = k4 ; then
AC_DEFINE(HAVE_KERBEROS)
KRB_DEFS="-DKERBEROS"
KRB_LIBS="-lkrb -ldes"
fi
fi
@ -282,10 +271,9 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
OL_POSIX_THREAD_VERSION
if test $ol_cv_pthread_version = final ; then
LTHREAD_DEFS="$LTHREAD_DEFS -DPOSIX_THREADS"
dnl AC_DEFINE(HAVE_PTHREADS_FINAL)
elif test $ol_cv_pthread_version = draft4 ; then
AC_DEFINE(HAVE_PTHREADS_D4)
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_MIT_PTHREADS"
else
AC_MSG_ERROR([unknown pthread version])
fi
@ -297,7 +285,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
if test $ol_cv_linux_threads = yes ; then
AC_DEFINE(HAVE_LINUX_THREADS,1)
LTHREAD_DEFS="$LTHREAD_DEFS -DLINUX_THREADS"
fi
dnl Now the hard part, how to link
@ -350,7 +337,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
AC_CHECK_LIB(pthread, pthread_create, [
AC_DEFINE(HAVE_DCE)
ol_link_threads=posix
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_DCE_THREADS"
LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lmach -lexc -lc"],,
if test $with_preemptive = auto ; then
ol_with_preemptive=yes
@ -365,7 +351,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
dnl save DEFS/LIBS
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
CPPFLAGS="$LTHREAD_DEFS $CPPFLAGS"
LIBS="$LTHREAD_LIBS $LIBS"
dnl All POSIX Thread (final) implementations should have
@ -461,8 +446,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = cthreads ; then
AC_CHECK_LIB(lwp, cthread_fork, [have_cthreads=yes], [have_cthreads=no])
if test $have_cthreads = yes ; then
AC_DEFINE(HAVE_CTHREADS)
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_NEXT_CTHREADS"
AC_DEFINE(HAVE_MACH_CTHREADS)
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
fi
fi
@ -477,7 +461,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
if test $have_lwp = yes ; then
AC_DEFINE(HAVE_LWP)
AC_DEFINE(HAVE_LWP_THR)
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS5_LWP"
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
fi
fi
@ -489,7 +472,6 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
if test $have_lwp = yes ; then
AC_DEFINE(HAVE_LWP)
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_SUNOS4_LWP"
LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
if test $with_preemptive = auto ; then
@ -500,7 +482,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = lwp ; then
fi
if test $ol_with_preemptive = yes ; then
LTHREAD_DEFS="$LTHREAD_DEFS -DTHREAD_PREEMPTIVE"
AC_DEFINE(THREAD_PREEMPTIVE,1)
fi
if test $ol_with_threads = manual ; then
@ -528,7 +510,7 @@ if test $ol_link_threads = no ; then
$ol_with_threads = no
fi
LTHREAD_DEFS="-DNO_THREADS"
AC_DEFINE(NO_THREADS,1)
LTHREAD_LIBS=""
fi
@ -540,12 +522,10 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db2 ; then
ol_link_ldbm=db2
ol_with_ldbm_api=db2
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2"
if test $ol_with_ldbm_type = hash ; then
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
AC_DEFINE(LDBM_USE_DBHASH,1)
else
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
AC_DEFINE(LDBM_USE_DBBTREE,1)
fi
dnl $ol_cv_lib_db2 should be yes or -ldb
@ -563,14 +543,10 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = db ; then
ol_link_ldbm=db
ol_with_ldbm_api=db
if test $ac_cv_header_db_185_h = yes ; then
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DB2_COMPAT185"
fi
if test $ol_with_ldbm_type = hash ; then
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBHASH"
AC_DEFINE(LDBM_USE_DBHASH,1)
else
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_DBBTREE"
AC_DEFINE(LDBM_USE_DBBTREE,1)
fi
dnl $ol_cv_lib_db should be yes or -ldb
@ -602,8 +578,6 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
ol_link_ldbm=gdbm
ol_with_ldbm_api=gdbm
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_GDBM"
if test $ol_cv_lib_gdbm != yes ; then
LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
fi
@ -621,8 +595,6 @@ if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = ndbm ; then
AC_WARN([Attempting to use NDBM. Functionality will be limited.])
fi
LDBM_DEFS="$LDBM_DEFS -DLDBM_USE_NDBM"
if test $ol_cv_lib_ndbm != yes ; then
LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
fi
@ -644,8 +616,7 @@ if test $ol_enable_wrappers = yes ; then
[have_wrappers=yes], [have_wrappers=no])
if test $have_wrappers = yes ; then
dnl AC_DEFINE(HAVE_TCPD)
SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
AC_DEFINE(HAVE_TCPD)
SLAPD_LIBS="$SLAPD_LIBS -lwrap"
else
AC_MSG_WARN(could not find -lwrap)
@ -682,7 +653,7 @@ if test $ol_link_termcap = no ; then
fi
if test $ol_link_termcap = no ; then
TERMCAP_DEFS="-DNOTERMCAP"
AC_DEFINE(NO_TERMCAP,1)
TERMCAP_LIBS=
fi
@ -693,8 +664,7 @@ if test $ol_enable_crypt != no ; then
have_crypt=yes], [have_crypt=no])])
if test $have_crypt = yes ; then
dnl AC_DEFINE(HAVE_CRYPT)
LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
AC_DEFINE(HAVE_CRYPT)
else
AC_MSG_WARN(could not find crypt)
if test $ol_enable_crypt = yes ; then
@ -789,71 +759,67 @@ dnl ----------------------------------------------------------------
dnl Sort out defines
if test $ol_enable_debug != no ; then
LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
AC_DEFINE(LDAP_DEBUG,1)
fi
dnl if test $ol_enable_syslog != no ; then
dnl LDAP_DEFS="$LDAP_DEFS -DLDAP_SYSLOG"
dnl AC_DEFINE(LDAP_SYSLOG,1)
dnl fi
if test $ol_enable_libui = yes ; then
LDAP_DEFS="$LDAP_DEFS -DLDAP_LIBUI"
AC_DEFINE(LDAP_LIBUI,1)
fi
if test $ol_enable_cache = no ; then
LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
AC_DEFINE(LDAP_NOCACHE,1)
fi
if test $ol_enable_dns != no ; then
LDAP_DEFS="$LDAP_DEFS -DLDAP_DNS"
AC_DEFINE(LDAP_DNS,1)
fi
if test $ol_enable_referrals != no ; then
LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
AC_DEFINE(LDAP_REFERRALS,1)
fi
if test $ol_enable_cldap != no ; then
LDAP_DEFS="$LDAP_DEFS -DCLDAP"
AC_DEFINE(LDAP_CONNECTIONLESS,1)
fi
if test $ol_enable_aclgroup != no ; then
AC_DEFINE(SLAPD_ACLGROUP,1)
SLAPD_DEFS="$SLAPD_DEFS -DACLGROUP"
fi
if test $ol_enable_crypt != no ; then
AC_DEFINE(SLAPD_CRYPT,1)
fi
if test $ol_enable_md5 != no ; then
dnl AC_DEFINE(SLAPD_MD5,1)
LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
AC_DEFINE(SLAPD_MD5,1)
fi
if test $ol_enable_sha1 != no ; then
dnl AC_DEFINE(SLAPD_SHA1,1)
LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
AC_DEFINE(SLAPD_SHA1,1)
fi
if test $ol_enable_phonetic != no ; then
AC_DEFINE(SLAPD_PHONETIC,1)
SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
fi
if test $ol_enable_rlookups != no ; then
AC_DEFINE(SLAPD_RLOOKUPS,1)
SLAPD_DEFS="$SLAPD_DEFS -DREVERSE_LOOKUPS"
fi
if test $ol_link_ldbm != no ; then
dnl AC_DEFINE(SLAPD_LDBM,1)
AC_DEFINE(SLAPD_LDBM,1)
BUILD_SLAPD=yes
BUILD_LDBM=yes
LDBM_DEFS="-DLDAP_LDBM $LDBM_DEFS"
fi
if test $ol_enable_passwd != no ; then
dnl AC_DEFINE(SLAPD_PASSWD,1)
AC_DEFINE(SLAPD_PASSWD,1)
BUILD_SLAPD=yes
BUILD_PASSWD=yes
SLAPD_DEFS="-DLDAP_PASSWD $SLAPD_DEFS"
fi
if test $ol_enable_shell != no ; then
dnl AC_DEFINE(SLAPD_SHELL,1)
AC_DEFINE(SLAPD_SHELL,1)
BUILD_SLAPD=yes
BUILD_SHELL=yes
SLAPD_DEFS="-DLDAP_SHELL $SLAPD_DEFS"
fi
if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
@ -871,24 +837,15 @@ AC_SUBST(BUILD_SLAPD)
AC_SUBST(BUILD_SLURPD)
AC_SUBST(LDAP_DEFS)
AC_SUBST(LDAP_LIBS)
AC_SUBST(LDAPD_DEFS)
AC_SUBST(LDAPD_LIBS)
AC_SUBST(SLAPD_DEFS)
AC_SUBST(SLAPD_LIBS)
AC_SUBST(SLURPD_DEFS)
AC_SUBST(SLURPD_LIBS)
AC_SUBST(LDBM_DEFS)
AC_SUBST(LDBM_LIBS)
AC_SUBST(LTHREAD_DEFS)
AC_SUBST(LTHREAD_LIBS)
AC_SUBST(LUTIL_DEFS)
AC_SUBST(LUTIL_LIBS)
AC_SUBST(KRB_DEFS)
AC_SUBST(KRB_LIBS)
AC_SUBST(TERMCAP_DEFS)
AC_SUBST(TERMCAP_LIBS)
dnl ----------------------------------------------------------------

View File

@ -21,6 +21,8 @@
* this structure represents a generic avl tree node.
*/
LDAP_BEGIN_DECL
typedef struct avlnode {
caddr_t avl_data;
signed char avl_bf;
@ -76,4 +78,6 @@ avl_apply LDAP_P((Avlnode *, IFP, caddr_t, int, int));
/* what apply returns if it ran out of nodes */
#define AVL_NOMORE -6
LDAP_END_DECL
#endif /* _AVL */

View File

@ -1,214 +0,0 @@
/*
* Copyright (c) 1994 Regents of the University of Michigan.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of Michigan at Ann Arbor. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
/* This file SHOULD go away !!! */
#ifndef _LDAP_BRIDGE_H
#define _LDAP_BRIDGE_H
/*
* portable.h for LDAP -- this is where we define common stuff to make
* life easier on various Unix systems.
*
* Unless you are porting LDAP to a new platform, you should not need to
* edit this file.
*/
#ifndef LDAP_LIBUI
#ifndef NO_USERINTERFACE
#define NO_USERINTERFACE
#endif
#endif
#ifndef SYSV
#if defined( hpux ) || defined( sunos5 ) || defined ( sgi ) || defined( SVR4 )
# define SYSV
#endif
#endif
/*
* under System V, use sysconf() instead of getdtablesize
*/
#if defined( HAVE_SYSCONF ) && !defined( HAVE_GETDTABLESIZE )
#define USE_SYSCONF
#endif
/*
* under System V, daemons should use setsid() instead of detaching from their
* tty themselves
*/
#if defined( HAVE_SETSID )
#define USE_SETSID
#endif
/*
* System V has socket options in filio.h
*/
#if defined( HAVE_FILIO_H )
#define NEED_FILIO
#endif
/*
* use lockf() under System V
*/
#if !defined( HAVE_LOCKF ) && !defined( HAVE_FLOCK )
#define USE_LOCKF
#endif
/*
* on most systems, we should use waitpid() instead of waitN()
*/
#if defined( HAVE_WAITPID ) && !defined( nextstep )
#define USE_WAITPID
#endif
/*
* define the wait status argument type
*/
#if !defined( WAITSTATUSTYPE )
#if !defined( HAVE_SYS_WAIT_H )
#define WAITSTATUSTYPE union wait
#else
#define WAITSTATUSTYPE int
#endif
#endif
/*
* define the flags for wait
*/
#if !defined( WAIT_FLAGS )
#ifdef sunos5
#define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
#else
#define WAIT_FLAGS ( WNOHANG | WUNTRACED )
#endif
#endif
/*
* defined the options for openlog (syslog)
*/
#if !defined( OPENLOG_OPTIONS )
#ifdef ultrix
#define OPENLOG_OPTIONS LOG_PID
#else
#define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT )
#endif
#endif
/*
* many systems do not have the setpwfile() library routine... we just
* enable use for those systems we know have it.
*/
#ifdef NOTDEF
#ifndef HAVE_SETPWFILE
#if defined( sunos4 ) || defined( ultrix ) || defined( __osf__ )
#define HAVE_SETPWFILE
#endif
#endif
#endif NOTDEF
#ifndef DISABLE_BRIDGE
/*
* Are sys_errlist and sys_nerr declared in stdio.h?
*/
#ifndef SYSERRLIST_IN_STDIO
#if !defined( DECL_SYS_ERRLIST )
#define SYSERRLIST_IN_STDIO
#endif
#endif
/*
* for select()
*/
#if !defined(FD_SET) && !defined(WINSOCK)
#define NFDBITS 32
#define FD_SETSIZE 32
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
#endif /* FD_SET */
#endif
#if defined( hpux ) && defined( __STDC__ )
/*
* Under HP/UX, select seems to want (int *) instead of fd_set. Non-ANSI
* compilers don't like recursive macros, so ignore the problem if __STDC__
* is not defined.
*/
#define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e)
#endif /* hpux && __STDC__ */
/*
* for signal() -- what do signal handling functions return?
*/
#ifdef RETSIGTYPE
#define SIG_FN RETSIGTYPE
#endif
/*
* call signal or sigset (signal does not block the signal while
* in the handler on sys v and sigset does not exist on bsd)
*/
#ifndef SIGNAL
#ifdef HAVE_SIGSET
#define SIGNAL sigset
#else
#define SIGNAL signal
#endif
#endif
/*
* toupper and tolower macros are different under bsd and sys v
*/
#if defined( SYSV ) && !defined( hpux )
#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c)
#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c)
#else
#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c)
#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c)
#endif
/*
* put a cover on the tty-related ioctl calls we need to use
*/
#if !defined( HAVE_TERMIOS_H )
#define TERMIO_TYPE struct sgttyb
#define TERMFLAG_TYPE int
#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop))
#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop))
#define GETFLAGS( tio ) (tio).sg_flags
#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags)
#else
#define USE_TERMIOS
#define TERMIO_TYPE struct termios
#define TERMFLAG_TYPE tcflag_t
#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop))
#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop))
#define GETFLAGS( tio ) (tio).c_lflag
#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags)
#endif
#if defined( ultrix ) || defined( nextstep )
extern char *strdup();
#endif /* ultrix || nextstep */
#endif /* _LDAP_BRIDGE_H */

View File

@ -116,9 +116,7 @@ struct berval {
char *bv_val;
};
#ifdef LDAP_DEBUG
extern int lber_debug;
#endif
/*
* in bprint.c:
@ -148,10 +146,8 @@ LDAP_F unsigned long ber_scanf LDAP_P(( BerElement *ber, char *fmt, ... ));
LDAP_F void ber_bvfree LDAP_P(( struct berval *bv ));
LDAP_F void ber_bvecfree LDAP_P(( struct berval **bv ));
LDAP_F struct berval *ber_bvdup LDAP_P(( struct berval *bv ));
#ifdef STR_TRANSLATION
LDAP_F void ber_set_string_translators LDAP_P(( BerElement *ber,
BERTranslateProc encode_proc, BERTranslateProc decode_proc ));
#endif /* STR_TRANSLATION */
/*
* in encode.c
@ -170,12 +166,7 @@ LDAP_F int ber_start_seq LDAP_P(( BerElement *ber, unsigned long tag ));
LDAP_F int ber_start_set LDAP_P(( BerElement *ber, unsigned long tag ));
LDAP_F int ber_put_seq LDAP_P(( BerElement *ber ));
LDAP_F int ber_put_set LDAP_P(( BerElement *ber ));
#ifdef __STDC__
LDAP_F int ber_printf LDAP_P(( BerElement *ber, char *fmt, ... ));
#else
LDAP_F int ber_printf ( );
#endif
/*
* in io.c:
@ -196,24 +187,6 @@ LDAP_F unsigned long ber_get_next LDAP_P(( Sockbuf *sb, unsigned long *len,
LDAP_F void ber_init LDAP_P(( BerElement *ber, int options ));
LDAP_F void ber_reset LDAP_P(( BerElement *ber, int was_writing ));
#if !defined(__alpha) || defined(VMS)
#define LBER_HTONL( l ) htonl( l )
#define LBER_NTOHL( l ) ntohl( l )
#else /* __alpha */
/*
* htonl and ntohl on the DEC Alpha under OSF 1 seem to only swap the
* lower-order 32-bits of a (64-bit) long, so we define correct versions
* here.
*/
#define LBER_HTONL( l ) (((long)htonl( (l) & 0x00000000FFFFFFFF )) << 32 \
| htonl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))
#define LBER_NTOHL( l ) (((long)ntohl( (l) & 0x00000000FFFFFFFF )) << 32 \
| ntohl( ( (l) & 0xFFFFFFFF00000000 ) >> 32 ))
#endif /* __alpha */
LDAP_END_DECL
#endif /* _LBER_H */

View File

@ -13,19 +13,9 @@
#ifndef _LDAP_H
#define _LDAP_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ldap_cdefs.h>
#ifdef WINSOCK
#include "msdos.h"
#include <winsock.h>
#endif
#if !defined( NEEDPROTOS ) && defined(__STDC__)
#define NEEDPROTOS 1
#endif
LDAP_BEGIN_DECL
#define LDAP_PORT 389
#define LDAP_VERSION1 1
@ -46,7 +36,8 @@ extern int ldap_debug;
#ifdef LDAP_SYSLOG
extern int ldap_syslog;
extern int ldap_syslog_level;
#endif
#endif /* LDAP_SYSLOG */
#define LDAP_DEBUG_TRACE 0x001
#define LDAP_DEBUG_PACKETS 0x002
#define LDAP_DEBUG_ARGS 0x004
@ -61,6 +52,7 @@ extern int ldap_syslog_level;
#define LDAP_DEBUG_PARSE 0x800
#define LDAP_DEBUG_ANY 0xffff
/* this doesn't below as part of ldap.h */
#ifdef LDAP_SYSLOG
#define Debug( level, fmt, arg1, arg2, arg3 ) \
{ \
@ -221,6 +213,8 @@ typedef struct ldapmod {
struct ldapmod *mod_next;
} LDAPMod;
typedef struct timeval * LDAP_timeval_p;
/*
* possible error codes we can return
*/
@ -295,7 +289,7 @@ typedef struct ldapmsg {
BerElement *lm_ber; /* the ber encoded message contents */
struct ldapmsg *lm_chain; /* for search - next msg in the resp */
struct ldapmsg *lm_next; /* next response */
unsigned long lm_time; /* used to maintain cache */
unsigned int lm_time; /* used to maintain cache */
} LDAPMessage;
#define NULLMSG ((LDAPMessage *) NULL)
@ -318,7 +312,7 @@ typedef struct ldap_server {
typedef struct ldap_conn {
Sockbuf *lconn_sb;
int lconn_refcnt;
unsigned long lconn_lastused; /* time */
time_t lconn_lastused; /* time */
int lconn_status;
#define LDAP_CONNST_NEEDSOCKET 1
#define LDAP_CONNST_CONNECTING 2
@ -453,12 +447,8 @@ typedef struct ldap {
int ld_cldaptimeout;/* time between retries */
int ld_refhoplimit; /* limit on referral nesting */
unsigned long ld_options; /* boolean options */
#ifdef LDAP_DNS
#define LDAP_OPT_DNS 0x00000001 /* use DN & DNS */
#endif /* LDAP_DNS */
#ifdef LDAP_REFERRALS
#define LDAP_OPT_REFERRALS 0x00000002 /* chase referrals */
#endif /* LDAP_REFERRALS */
#define LDAP_OPT_RESTART 0x00000004 /* restart if EINTR occurs */
/* do not mess with the rest though */
@ -512,81 +502,259 @@ typedef struct ldap_url_desc {
#define LDAP_URL_ERR_BADSCOPE 3 /* URL scope string is invalid */
#define LDAP_URL_ERR_MEM 4 /* can't allocate memory space */
/*
* in abandon.c:
*/
LDAP_F int ldap_abandon LDAP_P(( LDAP *ld, int msgid ));
#ifndef NEEDPROTOS
extern LDAP *ldap_open();
extern LDAP *ldap_init();
#ifdef STR_TRANSLATION
extern void ldap_set_string_translators();
#ifdef LDAP_CHARSET_8859
extern int ldap_t61_to_8859();
extern int ldap_8859_to_t61();
#endif /* LDAP_CHARSET_8859 */
#endif /* STR_TRANSLATION */
extern LDAPMessage *ldap_first_entry();
extern LDAPMessage *ldap_next_entry();
extern char *ldap_get_dn();
extern char *ldap_dn2ufn();
extern char **ldap_explode_dn();
extern char *ldap_first_attribute();
extern char *ldap_next_attribute();
extern char **ldap_get_values();
extern struct berval **ldap_get_values_len();
extern void ldap_value_free();
extern void ldap_value_free_len();
extern int ldap_count_values();
extern int ldap_count_values_len();
extern char *ldap_err2string();
extern void ldap_getfilter_free();
extern LDAPFiltDesc *ldap_init_getfilter();
extern LDAPFiltDesc *ldap_init_getfilter_buf();
extern LDAPFiltInfo *ldap_getfirstfilter();
extern LDAPFiltInfo *ldap_getnextfilter();
extern void ldap_setfilteraffixes();
extern void ldap_build_filter();
extern void ldap_flush_cache();
extern void ldap_set_cache_options();
extern void ldap_uncache_entry();
extern void ldap_uncache_request();
extern char *ldap_friendly_name();
extern void ldap_free_friendlymap();
extern LDAP *cldap_open();
extern void cldap_setretryinfo();
extern void cldap_close();
extern LDAPFiltDesc *ldap_ufn_setfilter();
extern int ldap_ufn_timeout();
extern int ldap_sort_entries();
extern int ldap_sort_values();
extern int ldap_sort_strcasecmp();
void ldap_free_urldesc();
void ldap_set_rebind_proc();
void ldap_enable_translation();
/*
* in add.c:
*/
LDAP_F int ldap_add LDAP_P(( LDAP *ld, char *dn, LDAPMod **attrs ));
LDAP_F int ldap_add_s LDAP_P(( LDAP *ld, char *dn, LDAPMod **attrs ));
/*
* in bind.c:
*/
LDAP_F int ldap_bind LDAP_P(( LDAP *ld, char *who, char *passwd, int authmethod ));
LDAP_F int ldap_bind_s LDAP_P(( LDAP *ld, char *who, char *cred, int method ));
LDAP_F void ldap_set_rebind_proc LDAP_P(( LDAP *ld,
int (*rebindproc) LDAP_P(( LDAP *ld, char **dnp, char **passwdp, int *authmethodp, int freeit ))
));
/*
* in sbind.c:
*/
LDAP_F int ldap_simple_bind LDAP_P(( LDAP *ld, char *who, char *passwd ));
LDAP_F int ldap_simple_bind_s LDAP_P(( LDAP *ld, char *who, char *passwd ));
/*
* in kbind.c:
*/
LDAP_F int ldap_kerberos_bind_s LDAP_P(( LDAP *ld, char *who ));
LDAP_F int ldap_kerberos_bind1 LDAP_P(( LDAP *ld, char *who ));
LDAP_F int ldap_kerberos_bind1_s LDAP_P(( LDAP *ld, char *who ));
LDAP_F int ldap_kerberos_bind2 LDAP_P(( LDAP *ld, char *who ));
LDAP_F int ldap_kerberos_bind2_s LDAP_P(( LDAP *ld, char *who ));
/*
* in cache.c
*/
LDAP_F int ldap_enable_cache LDAP_P(( LDAP *ld, long timeout, long maxmem ));
LDAP_F void ldap_disable_cache LDAP_P(( LDAP *ld ));
LDAP_F void ldap_set_cache_options LDAP_P(( LDAP *ld, unsigned long opts ));
LDAP_F void ldap_destroy_cache LDAP_P(( LDAP *ld ));
LDAP_F void ldap_flush_cache LDAP_P(( LDAP *ld ));
LDAP_F void ldap_uncache_entry LDAP_P(( LDAP *ld, char *dn ));
LDAP_F void ldap_uncache_request LDAP_P(( LDAP *ld, int msgid ));
/*
* in compare.c:
*/
LDAP_F int ldap_compare LDAP_P(( LDAP *ld, char *dn, char *attr, char *value ));
LDAP_F int ldap_compare_s LDAP_P(( LDAP *ld, char *dn, char *attr, char *value ));
/*
* in delete.c:
*/
LDAP_F int ldap_delete LDAP_P(( LDAP *ld, char *dn ));
LDAP_F int ldap_delete_s LDAP_P(( LDAP *ld, char *dn ));
/*
* in error.c:
*/
LDAP_F int ldap_result2error LDAP_P(( LDAP *ld, LDAPMessage *r, int freeit ));
LDAP_F char *ldap_err2string LDAP_P(( int err ));
LDAP_F void ldap_perror LDAP_P(( LDAP *ld, char *s ));
/*
* in modify.c:
*/
LDAP_F int ldap_modify LDAP_P(( LDAP *ld, char *dn, LDAPMod **mods ));
LDAP_F int ldap_modify_s LDAP_P(( LDAP *ld, char *dn, LDAPMod **mods ));
/*
* in modrdn.c:
*/
LDAP_F int ldap_modrdn LDAP_P(( LDAP *ld, char *dn, char *newrdn ));
LDAP_F int ldap_modrdn_s LDAP_P(( LDAP *ld, char *dn, char *newrdn ));
LDAP_F int ldap_modrdn2 LDAP_P(( LDAP *ld, char *dn, char *newrdn,
int deleteoldrdn ));
LDAP_F int ldap_modrdn2_s LDAP_P(( LDAP *ld, char *dn, char *newrdn,
int deleteoldrdn));
/*
* in open.c:
*/
LDAP_F LDAP *ldap_open LDAP_P(( char *host, int port ));
LDAP_F LDAP *ldap_init LDAP_P(( char *defhost, int defport ));
/*
* in getentry.c:
*/
LDAP_F LDAPMessage *ldap_first_entry LDAP_P(( LDAP *ld, LDAPMessage *chain ));
LDAP_F LDAPMessage *ldap_next_entry LDAP_P(( LDAP *ld, LDAPMessage *entry ));
LDAP_F int ldap_count_entries LDAP_P(( LDAP *ld, LDAPMessage *chain ));
/*
* in addentry.c
*/
LDAP_F LDAPMessage *ldap_delete_result_entry LDAP_P(( LDAPMessage **list,
LDAPMessage *e ));
LDAP_F void ldap_add_result_entry LDAP_P(( LDAPMessage **list, LDAPMessage *e ));
/*
* in getdn.c
*/
LDAP_F char *ldap_get_dn LDAP_P(( LDAP *ld, LDAPMessage *entry ));
LDAP_F char *ldap_dn2ufn LDAP_P(( char *dn ));
LDAP_F char **ldap_explode_dn LDAP_P(( char *dn, int notypes ));
LDAP_F char **ldap_explode_dns LDAP_P(( char *dn ));
LDAP_F int ldap_is_dns_dn LDAP_P(( char *dn ));
/*
* in getattr.c
*/
LDAP_F char *ldap_first_attribute LDAP_P(( LDAP *ld, LDAPMessage *entry,
BerElement **ber ));
LDAP_F char *ldap_next_attribute LDAP_P(( LDAP *ld, LDAPMessage *entry,
BerElement *ber ));
/*
* in getvalues.c
*/
LDAP_F char **ldap_get_values LDAP_P(( LDAP *ld, LDAPMessage *entry, char *target ));
LDAP_F struct berval **ldap_get_values_len LDAP_P(( LDAP *ld, LDAPMessage *entry,
char *target ));
LDAP_F int ldap_count_values LDAP_P(( char **vals ));
LDAP_F int ldap_count_values_len LDAP_P(( struct berval **vals ));
LDAP_F void ldap_value_free LDAP_P(( char **vals ));
LDAP_F void ldap_value_free_len LDAP_P(( struct berval **vals ));
/*
* in result.c:
*/
LDAP_F int ldap_result LDAP_P(( LDAP *ld, int msgid, int all,
LDAP_timeval_p timeout, LDAPMessage **result ));
LDAP_F int ldap_msgfree LDAP_P(( LDAPMessage *lm ));
LDAP_F int ldap_msgdelete LDAP_P(( LDAP *ld, int msgid ));
/*
* in search.c:
*/
LDAP_F int ldap_search LDAP_P(( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly ));
LDAP_F int ldap_search_s LDAP_P(( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, LDAPMessage **res ));
LDAP_F int ldap_search_st LDAP_P(( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res ));
/*
* in ufn.c
*/
LDAP_F int ldap_ufn_search_c LDAP_P(( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ),
void *cancelparm ));
LDAP_F int ldap_ufn_search_ct LDAP_P(( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ),
void *cancelparm, char *tag1, char *tag2, char *tag3 ));
LDAP_F int ldap_ufn_search_s LDAP_P(( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res ));
LDAP_F LDAPFiltDesc *ldap_ufn_setfilter LDAP_P(( LDAP *ld, char *fname ));
LDAP_F void ldap_ufn_setprefix LDAP_P(( LDAP *ld, char *prefix ));
LDAP_F int ldap_ufn_timeout LDAP_P(( void *tvparam ));
#if defined(ultrix) || defined(VMS) || defined( nextstep )
extern char *strdup();
#endif
/*
* in unbind.c
*/
LDAP_F int ldap_unbind LDAP_P(( LDAP *ld ));
LDAP_F int ldap_unbind_s LDAP_P(( LDAP *ld ));
#else /* NEEDPROTOS */
#if !defined(MACOS) && !defined(DOS) && !defined(_WIN32) && !defined(WINSOCK)
#include <sys/time.h>
#endif
#if defined(WINSOCK)
#include "proto-ld.h"
#else
#include "proto-ldap.h"
#endif
#ifdef VMS
extern char *strdup( const char *s );
#endif
#if defined(ultrix) || defined( nextstep )
extern char *strdup();
#endif
/*
* in getfilter.c
*/
LDAP_F LDAPFiltDesc *ldap_init_getfilter LDAP_P(( char *fname ));
LDAP_F LDAPFiltDesc *ldap_init_getfilter_buf LDAP_P(( char *buf, long buflen ));
LDAP_F LDAPFiltInfo *ldap_getfirstfilter LDAP_P(( LDAPFiltDesc *lfdp, char *tagpat,
char *value ));
LDAP_F LDAPFiltInfo *ldap_getnextfilter LDAP_P(( LDAPFiltDesc *lfdp ));
LDAP_F void ldap_setfilteraffixes LDAP_P(( LDAPFiltDesc *lfdp, char *prefix, char *suffix ));
LDAP_F void ldap_build_filter LDAP_P(( char *buf, unsigned long buflen,
char *pattern, char *prefix, char *suffix, char *attr,
char *value, char **valwords ));
#endif /* NEEDPROTOS */
/*
* in free.c
*/
LDAP_F void ldap_getfilter_free LDAP_P(( LDAPFiltDesc *lfdp ));
LDAP_F void ldap_mods_free LDAP_P(( LDAPMod **mods, int freemods ));
/*
* in friendly.c
*/
LDAP_F char *ldap_friendly_name LDAP_P(( char *filename, char *uname,
FriendlyMap **map ));
LDAP_F void ldap_free_friendlymap LDAP_P(( FriendlyMap **map ));
/*
* in cldap.c
*/
LDAP_F LDAP *cldap_open LDAP_P(( char *host, int port ));
LDAP_F void cldap_close LDAP_P(( LDAP *ld ));
LDAP_F int cldap_search_s LDAP_P(( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, LDAPMessage **res, char *logdn ));
LDAP_F void cldap_setretryinfo LDAP_P(( LDAP *ld, int tries, int timeout ));
/*
* in sort.c
*/
LDAP_F int ldap_sort_entries LDAP_P(( LDAP *ld, LDAPMessage **chain, char *attr,
int (*cmp)() ));
LDAP_F int ldap_sort_values LDAP_P(( LDAP *ld, char **vals, int (*cmp)() ));
LDAP_F int ldap_sort_strcasecmp LDAP_P(( char **a, char **b ));
/*
* in url.c
*/
LDAP_F int ldap_is_ldap_url LDAP_P(( char *url ));
LDAP_F int ldap_url_parse LDAP_P(( char *url, LDAPURLDesc **ludpp ));
LDAP_F void ldap_free_urldesc LDAP_P(( LDAPURLDesc *ludp ));
LDAP_F int ldap_url_search LDAP_P(( LDAP *ld, char *url, int attrsonly ));
LDAP_F int ldap_url_search_s LDAP_P(( LDAP *ld, char *url, int attrsonly,
LDAPMessage **res ));
LDAP_F int ldap_url_search_st LDAP_P(( LDAP *ld, char *url, int attrsonly,
struct timeval *timeout, LDAPMessage **res ));
/*
* in charset.c
*/
LDAP_F void ldap_set_string_translators LDAP_P(( LDAP *ld,
BERTranslateProc encode_proc, BERTranslateProc decode_proc ));
LDAP_F int ldap_translate_from_t61 LDAP_P(( LDAP *ld, char **bufp,
unsigned long *lenp, int free_input ));
LDAP_F int ldap_translate_to_t61 LDAP_P(( LDAP *ld, char **bufp,
unsigned long *lenp, int free_input ));
LDAP_F void ldap_enable_translation LDAP_P(( LDAP *ld, LDAPMessage *entry,
int enable ));
LDAP_F int ldap_t61_to_8859 LDAP_P(( char **bufp, unsigned long *buflenp,
int free_input ));
LDAP_F int ldap_8859_to_t61 LDAP_P(( char **bufp, unsigned long *buflenp,
int free_input ));
/*
* in msdos/winsock/wsa.c
*/
LDAP_F void ldap_memfree LDAP_P(( void *p ));
LDAP_END_DECL
#ifdef __cplusplus
}
#endif
#endif /* _LDAP_H */

View File

@ -29,16 +29,16 @@ typedef void * pthread_rdwrattr_t;
#define pthread_rdwrattr_default NULL;
int pthread_rdwr_init_np LDAP_P((pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp));
int pthread_rdwr_rlock_np LDAP_P((pthread_rdwr_t *rdwrp));
int pthread_rdwr_runlock_np LDAP_P((pthread_rdwr_t *rdwrp));
int pthread_rdwr_wlock_np LDAP_P((pthread_rdwr_t *rdwrp));
int pthread_rdwr_wunlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_init_np LDAP_P((pthread_rdwr_t *rdwrp, pthread_rdwrattr_t *attrp));
LDAP_F int pthread_rdwr_rlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_runlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_wlock_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_wunlock_np LDAP_P((pthread_rdwr_t *rdwrp));
#ifdef LDAP_DEBUG
int pthread_rdwr_rchk_np LDAP_P((pthread_rdwr_t *rdwrp));
int pthread_rdwr_wchk_np LDAP_P((pthread_rdwr_t *rdwrp));
int pthread_rdwr_rwchk_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_rchk_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_wchk_np LDAP_P((pthread_rdwr_t *rdwrp));
LDAP_F int pthread_rdwr_rwchk_np LDAP_P((pthread_rdwr_t *rdwrp));
#endif /* LDAP_DEBUG */
LDAP_END_DECL

View File

@ -3,7 +3,6 @@
# include <stddef.h>
#endif
#include "bridge.h"
#include "ldap_cdefs.h"
#endif /* _LDAP_PORTABLE_H */

View File

@ -108,13 +108,13 @@ is provided ``as is'' without express or implied warranty.
#undef DECL_SYS_ERRLIST
/* define if you have berkeley db */
#undef HAVE_BERKELEY_DB2
#undef HAVE_BERKELEY_DB
/* define if you have berkeley db2 */
#undef HAVE_BERKELEY_DB2
/* define if you have Mach CThreads */
#undef HAVE_CTHREADS
/* define if you have crypt */
#undef HAVE_CRYPT
/* define if you have DCE */
#undef HAVE_DCE
@ -140,6 +140,9 @@ is provided ``as is'' without express or implied warranty.
/* define if you have NDBM */
#undef HAVE_NDBM
/* define if you have Mach CThreads */
#undef HAVE_MACH_CTHREADS
/* define if you have a preemptive POSIX Threads implementation */
#undef HAVE_PREEMPTIVE_PTHREADS
@ -152,14 +155,68 @@ is provided ``as is'' without express or implied warranty.
/* define if you have -ltermcap */
#undef HAVE_TERMCAP
/* define if you have -lwrap */
#undef HAVE_TCPD
/* define this for connectionless LDAP support */
#undef LDAP_CONNECTIONLESS
/* define this to add debugging code */
#undef LDAP_DEBUG
/* define this for LDAP DNS support */
#undef LDAP_DNS
/* define this to remove -lldap cache support */
#undef LDAP_NOCACHE
/* define this for LDAP referrals support */
#undef LDAP_REFERRALS
/* define this for LDAP User Interface support */
#undef LDAP_LIBUI
/* define this for ACL Group support */
#undef SLAPD_ACLGROUPS
/* define this for crypt(3) password support */
#undef SLAPD_CRYPT
/* define this to use SLAPD LDBM backend */
#undef SLAPD_LDBM
/* define this for MD5 password support */
#undef SLAPD_MD5
/* define this to use SLAPD passwd backend */
#undef SLAPD_PASSWD
/* define this for phonetic support */
#undef SLAPD_PHONETIC
/* define this for Reverse Lookup support */
#undef SLAPD_RLOOKUPS
/* define this for phonetic support */
#undef SLAPD_PHONETIC
/* define this for SHA1 password support */
#undef SLAPD_SHA1
/* define this to use SLAPD shell backend */
#undef SLAPD_SHELL
/* define this to use DBBTREE w/ LDBM backend */
#undef LDBM_USE_DBBTREE
/* define this to use DBHASH w/ LDBM backend */
#undef LDBM_USE_DBHASH
/* define this if you want no termcap support */
#undef NO_TERMCAP
/* define this if you want no thread support */
#undef NO_THREADS
/* define this if the thread package is preemptive */
#undef THREAD_PREEMPTIVE
/* Define if you have the bcopy function. */
#undef HAVE_BCOPY
@ -363,7 +420,6 @@ is provided ``as is'' without express or implied warranty.
# include <stddef.h>
#endif
#include "bridge.h"
#include "ldap_cdefs.h"
#endif /* _LDAP_PORTABLE_H */

View File

@ -1,102 +0,0 @@
/*
* lber-proto.h
* function prototypes for lber library
*/
#ifdef LDAP_DEBUG
extern int lber_debug;
#endif
#ifndef LDAPFUNCDECL
#ifdef _WIN32
#define LDAPFUNCDECL __declspec( dllexport )
#else /* _WIN32 */
#define LDAPFUNCDECL
#endif /* _WIN32 */
#endif /* LDAPFUNCDECL */
/*
* in bprint.c:
*/
LDAPFUNCDECL void lber_bprint( char *data, int len );
/*
* in decode.c:
*/
LDAPFUNCDECL unsigned long ber_get_tag( BerElement *ber );
LDAPFUNCDECL unsigned long ber_skip_tag( BerElement *ber, unsigned long *len );
LDAPFUNCDECL unsigned long ber_peek_tag( BerElement *ber, unsigned long *len );
LDAPFUNCDECL unsigned long ber_get_int( BerElement *ber, long *num );
LDAPFUNCDECL unsigned long ber_get_stringb( BerElement *ber, char *buf,
unsigned long *len );
LDAPFUNCDECL unsigned long ber_get_stringa( BerElement *ber, char **buf );
LDAPFUNCDECL unsigned long ber_get_stringal( BerElement *ber, struct berval **bv );
LDAPFUNCDECL unsigned long ber_get_bitstringa( BerElement *ber, char **buf,
unsigned long *len );
LDAPFUNCDECL unsigned long ber_get_null( BerElement *ber );
LDAPFUNCDECL unsigned long ber_get_boolean( BerElement *ber, int *boolval );
LDAPFUNCDECL unsigned long ber_first_element( BerElement *ber, unsigned long *len,
char **last );
LDAPFUNCDECL unsigned long ber_next_element( BerElement *ber, unsigned long *len,
char *last );
#if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 )
LDAPFUNCDECL unsigned long ber_scanf( BerElement *ber, char *fmt, ... );
#else
LDAPFUNCDECL unsigned long ber_scanf();
#endif
LDAPFUNCDECL void ber_bvfree( struct berval *bv );
LDAPFUNCDECL void ber_bvecfree( struct berval **bv );
LDAPFUNCDECL struct berval *ber_bvdup( struct berval *bv );
#ifdef STR_TRANSLATION
LDAPFUNCDECL void ber_set_string_translators( BerElement *ber,
BERTranslateProc encode_proc, BERTranslateProc decode_proc );
#endif /* STR_TRANSLATION */
/*
* in encode.c
*/
LDAPFUNCDECL int ber_put_enum( BerElement *ber, long num, unsigned long tag );
LDAPFUNCDECL int ber_put_int( BerElement *ber, long num, unsigned long tag );
LDAPFUNCDECL int ber_put_ostring( BerElement *ber, char *str, unsigned long len,
unsigned long tag );
LDAPFUNCDECL int ber_put_string( BerElement *ber, char *str, unsigned long tag );
LDAPFUNCDECL int ber_put_bitstring( BerElement *ber, char *str,
unsigned long bitlen, unsigned long tag );
LDAPFUNCDECL int ber_put_null( BerElement *ber, unsigned long tag );
LDAPFUNCDECL int ber_put_boolean( BerElement *ber, int boolval,
unsigned long tag );
LDAPFUNCDECL int ber_start_seq( BerElement *ber, unsigned long tag );
LDAPFUNCDECL int ber_start_set( BerElement *ber, unsigned long tag );
LDAPFUNCDECL int ber_put_seq( BerElement *ber );
LDAPFUNCDECL int ber_put_set( BerElement *ber );
#if defined( MACOS ) || defined( BC31 ) || defined( _WIN32 )
LDAPFUNCDECL int ber_printf( BerElement *ber, char *fmt, ... );
#else
LDAPFUNCDECL int ber_printf();
#endif
/*
* in io.c:
*/
LDAPFUNCDECL long ber_read( BerElement *ber, char *buf, unsigned long len );
LDAPFUNCDECL long ber_write( BerElement *ber, char *buf, unsigned long len,
int nosos );
LDAPFUNCDECL void ber_free( BerElement *ber, int freebuf );
LDAPFUNCDECL int ber_flush( Sockbuf *sb, BerElement *ber, int freeit );
LDAPFUNCDECL BerElement *ber_alloc( void );
LDAPFUNCDECL BerElement *der_alloc( void );
LDAPFUNCDECL BerElement *ber_alloc_t( int options );
LDAPFUNCDECL BerElement *ber_dup( BerElement *ber );
LDAPFUNCDECL void ber_dump( BerElement *ber, int inout );
LDAPFUNCDECL void ber_sos_dump( Seqorset *sos );
LDAPFUNCDECL unsigned long ber_get_next( Sockbuf *sb, unsigned long *len,
BerElement *ber );
LDAPFUNCDECL void ber_init( BerElement *ber, int options );
LDAPFUNCDECL void ber_reset( BerElement *ber, int was_writing );
#ifdef NEEDGETOPT
/*
* in getopt.c
*/
int getopt( int nargc, char **nargv, char *ostr );
#endif /* NEEDGETOPT */

View File

@ -1,276 +0,0 @@
/*
* proto-ldap.h
* function prototypes for ldap library
*/
#ifndef LDAPFUNCDECL
#ifdef _WIN32
#define LDAPFUNCDECL __declspec( dllexport )
#else /* _WIN32 */
#define LDAPFUNCDECL
#endif /* _WIN32 */
#endif /* LDAPFUNCDECL */
/*
* in abandon.c:
*/
LDAPFUNCDECL int ldap_abandon( LDAP *ld, int msgid );
/*
* in add.c:
*/
LDAPFUNCDECL int ldap_add( LDAP *ld, char *dn, LDAPMod **attrs );
LDAPFUNCDECL int ldap_add_s( LDAP *ld, char *dn, LDAPMod **attrs );
/*
* in bind.c:
*/
LDAPFUNCDECL int ldap_bind( LDAP *ld, char *who, char *passwd, int authmethod );
LDAPFUNCDECL int ldap_bind_s( LDAP *ld, char *who, char *cred, int method );
#ifdef LDAP_REFERRALS
LDAPFUNCDECL void ldap_set_rebind_proc( LDAP *ld, int (*rebindproc)( LDAP *ld,
char **dnp, char **passwdp, int *authmethodp, int freeit ));
#endif /* LDAP_REFERRALS */
/*
* in sbind.c:
*/
LDAPFUNCDECL int ldap_simple_bind( LDAP *ld, char *who, char *passwd );
LDAPFUNCDECL int ldap_simple_bind_s( LDAP *ld, char *who, char *passwd );
/*
* in kbind.c:
*/
LDAPFUNCDECL int ldap_kerberos_bind_s( LDAP *ld, char *who );
LDAPFUNCDECL int ldap_kerberos_bind1( LDAP *ld, char *who );
LDAPFUNCDECL int ldap_kerberos_bind1_s( LDAP *ld, char *who );
LDAPFUNCDECL int ldap_kerberos_bind2( LDAP *ld, char *who );
LDAPFUNCDECL int ldap_kerberos_bind2_s( LDAP *ld, char *who );
#ifndef NO_CACHE
/*
* in cache.c
*/
LDAPFUNCDECL int ldap_enable_cache( LDAP *ld, long timeout, long maxmem );
LDAPFUNCDECL void ldap_disable_cache( LDAP *ld );
LDAPFUNCDECL void ldap_set_cache_options( LDAP *ld, unsigned long opts );
LDAPFUNCDECL void ldap_destroy_cache( LDAP *ld );
LDAPFUNCDECL void ldap_flush_cache( LDAP *ld );
LDAPFUNCDECL void ldap_uncache_entry( LDAP *ld, char *dn );
LDAPFUNCDECL void ldap_uncache_request( LDAP *ld, int msgid );
#endif /* !NO_CACHE */
/*
* in compare.c:
*/
LDAPFUNCDECL int ldap_compare( LDAP *ld, char *dn, char *attr, char *value );
LDAPFUNCDECL int ldap_compare_s( LDAP *ld, char *dn, char *attr, char *value );
/*
* in delete.c:
*/
LDAPFUNCDECL int ldap_delete( LDAP *ld, char *dn );
LDAPFUNCDECL int ldap_delete_s( LDAP *ld, char *dn );
/*
* in error.c:
*/
LDAPFUNCDECL int ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit );
LDAPFUNCDECL char *ldap_err2string( int err );
LDAPFUNCDECL void ldap_perror( LDAP *ld, char *s );
/*
* in modify.c:
*/
LDAPFUNCDECL int ldap_modify( LDAP *ld, char *dn, LDAPMod **mods );
LDAPFUNCDECL int ldap_modify_s( LDAP *ld, char *dn, LDAPMod **mods );
/*
* in modrdn.c:
*/
LDAPFUNCDECL int ldap_modrdn( LDAP *ld, char *dn, char *newrdn );
LDAPFUNCDECL int ldap_modrdn_s( LDAP *ld, char *dn, char *newrdn );
LDAPFUNCDECL int ldap_modrdn2( LDAP *ld, char *dn, char *newrdn,
int deleteoldrdn );
LDAPFUNCDECL int ldap_modrdn2_s( LDAP *ld, char *dn, char *newrdn,
int deleteoldrdn);
/*
* in open.c:
*/
LDAPFUNCDECL LDAP *ldap_open( char *host, int port );
LDAPFUNCDECL LDAP *ldap_init( char *defhost, int defport );
/*
* in getentry.c:
*/
LDAPFUNCDECL LDAPMessage *ldap_first_entry( LDAP *ld, LDAPMessage *chain );
LDAPFUNCDECL LDAPMessage *ldap_next_entry( LDAP *ld, LDAPMessage *entry );
LDAPFUNCDECL int ldap_count_entries( LDAP *ld, LDAPMessage *chain );
/*
* in addentry.c
*/
LDAPFUNCDECL LDAPMessage *ldap_delete_result_entry( LDAPMessage **list,
LDAPMessage *e );
LDAPFUNCDECL void ldap_add_result_entry( LDAPMessage **list, LDAPMessage *e );
/*
* in getdn.c
*/
LDAPFUNCDECL char *ldap_get_dn( LDAP *ld, LDAPMessage *entry );
LDAPFUNCDECL char *ldap_dn2ufn( char *dn );
LDAPFUNCDECL char **ldap_explode_dn( char *dn, int notypes );
LDAPFUNCDECL char **ldap_explode_dns( char *dn );
LDAPFUNCDECL int ldap_is_dns_dn( char *dn );
/*
* in getattr.c
*/
LDAPFUNCDECL char *ldap_first_attribute( LDAP *ld, LDAPMessage *entry,
BerElement **ber );
LDAPFUNCDECL char *ldap_next_attribute( LDAP *ld, LDAPMessage *entry,
BerElement *ber );
/*
* in getvalues.c
*/
LDAPFUNCDECL char **ldap_get_values( LDAP *ld, LDAPMessage *entry, char *target );
LDAPFUNCDECL struct berval **ldap_get_values_len( LDAP *ld, LDAPMessage *entry,
char *target );
LDAPFUNCDECL int ldap_count_values( char **vals );
LDAPFUNCDECL int ldap_count_values_len( struct berval **vals );
LDAPFUNCDECL void ldap_value_free( char **vals );
LDAPFUNCDECL void ldap_value_free_len( struct berval **vals );
/*
* in result.c:
*/
LDAPFUNCDECL int ldap_result( LDAP *ld, int msgid, int all,
struct timeval *timeout, LDAPMessage **result );
LDAPFUNCDECL int ldap_msgfree( LDAPMessage *lm );
LDAPFUNCDECL int ldap_msgdelete( LDAP *ld, int msgid );
/*
* in search.c:
*/
LDAPFUNCDECL int ldap_search( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly );
LDAPFUNCDECL int ldap_search_s( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, LDAPMessage **res );
LDAPFUNCDECL int ldap_search_st( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, struct timeval *timeout, LDAPMessage **res );
/*
* in ufn.c
*/
LDAPFUNCDECL int ldap_ufn_search_c( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ),
void *cancelparm );
LDAPFUNCDECL int ldap_ufn_search_ct( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res, int (*cancelproc)( void *cl ),
void *cancelparm, char *tag1, char *tag2, char *tag3 );
LDAPFUNCDECL int ldap_ufn_search_s( LDAP *ld, char *ufn, char **attrs,
int attrsonly, LDAPMessage **res );
LDAPFUNCDECL LDAPFiltDesc *ldap_ufn_setfilter( LDAP *ld, char *fname );
LDAPFUNCDECL void ldap_ufn_setprefix( LDAP *ld, char *prefix );
LDAPFUNCDECL int ldap_ufn_timeout( void *tvparam );
/*
* in unbind.c
*/
LDAPFUNCDECL int ldap_unbind( LDAP *ld );
LDAPFUNCDECL int ldap_unbind_s( LDAP *ld );
/*
* in getfilter.c
*/
LDAPFUNCDECL LDAPFiltDesc *ldap_init_getfilter( char *fname );
LDAPFUNCDECL LDAPFiltDesc *ldap_init_getfilter_buf( char *buf, long buflen );
LDAPFUNCDECL LDAPFiltInfo *ldap_getfirstfilter( LDAPFiltDesc *lfdp, char *tagpat,
char *value );
LDAPFUNCDECL LDAPFiltInfo *ldap_getnextfilter( LDAPFiltDesc *lfdp );
LDAPFUNCDECL void ldap_setfilteraffixes( LDAPFiltDesc *lfdp, char *prefix, char *suffix );
LDAPFUNCDECL void ldap_build_filter( char *buf, unsigned long buflen,
char *pattern, char *prefix, char *suffix, char *attr,
char *value, char **valwords );
/*
* in free.c
*/
LDAPFUNCDECL void ldap_getfilter_free( LDAPFiltDesc *lfdp );
LDAPFUNCDECL void ldap_mods_free( LDAPMod **mods, int freemods );
/*
* in friendly.c
*/
LDAPFUNCDECL char *ldap_friendly_name( char *filename, char *uname,
FriendlyMap **map );
LDAPFUNCDECL void ldap_free_friendlymap( FriendlyMap **map );
/*
* in cldap.c
*/
LDAPFUNCDECL LDAP *cldap_open( char *host, int port );
LDAPFUNCDECL void cldap_close( LDAP *ld );
LDAPFUNCDECL int cldap_search_s( LDAP *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, LDAPMessage **res, char *logdn );
LDAPFUNCDECL void cldap_setretryinfo( LDAP *ld, int tries, int timeout );
/*
* in sort.c
*/
LDAPFUNCDECL int ldap_sort_entries( LDAP *ld, LDAPMessage **chain, char *attr,
int (*cmp)() );
LDAPFUNCDECL int ldap_sort_values( LDAP *ld, char **vals, int (*cmp)() );
LDAPFUNCDECL int ldap_sort_strcasecmp( char **a, char **b );
/*
* in url.c
*/
LDAPFUNCDECL int ldap_is_ldap_url( char *url );
LDAPFUNCDECL int ldap_url_parse( char *url, LDAPURLDesc **ludpp );
LDAPFUNCDECL void ldap_free_urldesc( LDAPURLDesc *ludp );
LDAPFUNCDECL int ldap_url_search( LDAP *ld, char *url, int attrsonly );
LDAPFUNCDECL int ldap_url_search_s( LDAP *ld, char *url, int attrsonly,
LDAPMessage **res );
LDAPFUNCDECL int ldap_url_search_st( LDAP *ld, char *url, int attrsonly,
struct timeval *timeout, LDAPMessage **res );
/*
* in charset.c
*/
#ifdef STR_TRANSLATION
LDAPFUNCDECL void ldap_set_string_translators( LDAP *ld,
BERTranslateProc encode_proc, BERTranslateProc decode_proc );
LDAPFUNCDECL int ldap_translate_from_t61( LDAP *ld, char **bufp,
unsigned long *lenp, int free_input );
LDAPFUNCDECL int ldap_translate_to_t61( LDAP *ld, char **bufp,
unsigned long *lenp, int free_input );
LDAPFUNCDECL void ldap_enable_translation( LDAP *ld, LDAPMessage *entry,
int enable );
#ifdef LDAP_CHARSET_8859
LDAPFUNCDECL int ldap_t61_to_8859( char **bufp, unsigned long *buflenp,
int free_input );
LDAPFUNCDECL int ldap_8859_to_t61( char **bufp, unsigned long *buflenp,
int free_input );
#endif /* LDAP_CHARSET_8859 */
#endif /* STR_TRANSLATION */
#ifdef WINSOCK
/*
* in msdos/winsock/wsa.c
*/
LDAPFUNCDECL void ldap_memfree( void *p );
#endif /* WINSOCK */

View File

@ -24,14 +24,13 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#ifdef MACOS
#include <stdlib.h>
#include "macos.h"
#endif /* MACOS */
#if defined( DOS ) || defined( _WIN32 )
#include <stdlib.h>
#include <malloc.h>
#include "msdos.h"
#endif /* DOS || _WIN32 */
@ -47,15 +46,9 @@ static char copyright[] = "@(#) Copyright (c) 1996 Regents of the University of
#include "ldap-int.h"
#ifdef NEEDPROTOS
static int skip_url_prefix( char **urlp, int *enclosedp );
static void hex_unescape( char *s );
static int unhex( char c );
#else /* NEEDPROTOS */
static int skip_url_prefix();
static void hex_unescape();
static int unhex();
#endif /* NEEDPROTOS */
static int skip_url_prefix LDAP_P(( char **urlp, int *enclosedp ));
static void hex_unescape LDAP_P(( char *s ));
static int unhex LDAP_P(( char c ));
int
@ -305,10 +298,10 @@ ldap_url_search( LDAP *ld, char *url, int attrsonly )
ber_free( ber, 1 );
} else {
#ifdef LDAP_REFERRALS
err = send_server_request( ld, ber, ld->ld_msgid, NULL, srv,
err = ldap_send_server_request( ld, ber, ld->ld_msgid, NULL, srv,
NULL, 1 );
#else /* LDAP_REFERRALS */
err = send_initial_request( ld, LDAP_REQ_SEARCH,
err = ldap_send_initial_request( ld, LDAP_REQ_SEARCH,
ludp->lud_dn, ber );
#endif /* LDAP_REFERRALS */
}

View File

@ -10,7 +10,6 @@ OBJS = ldbm.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XDEFS = @LDBM_DEFS@
XLIBS = @LDBM_LIBS@ -lavl
testldbm: libldbm.a testldbm.o

View File

@ -10,7 +10,6 @@ OBJS = rdwr.o thread.o stack.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XDEFS = @LTHREAD_DEFS@
XLIBS = @LTHREAD_LIBS@

View File

@ -9,4 +9,3 @@ OBJS = base64.o md5.o sha1.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XDEFS = @LUTIL_DEFS@

View File

@ -17,7 +17,6 @@ LDAP_LIBDIR= ../../libraries
BUILD_OPT = "--enable-ldapd"
BUILD_SRV = @BUILD_LDAPD@
XDEFS= @LDAPD_DEFS@
XLIBS= @LDAPD_LIBS@
all-local: $(PROGRAMS)

View File

@ -29,7 +29,6 @@ all-local: FORCE
$(MAKE) $(MFLAGS) slapd
(cd tools; $(MAKE) $(MFLAGS) all)
XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@
XLIBS = @SLAPD_LIBS@ libbackends.a \
-lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ @LUTIL_LIBS@

View File

@ -14,7 +14,6 @@ BUILD_OPT = "--enable-ldbm"
BUILD_SRV = @BUILD_LDBM@
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@
PROGRAMS = libback-ldbm.a

View File

@ -10,7 +10,6 @@ BUILD_SRV = @BUILD_PASSWD@
PROGRAMS= libback-passwd.a
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = @LTHREAD_DEFS@
all-local: FORCE
$(MAKE) $(MFLAGS) libback-passwd.a

View File

@ -12,7 +12,6 @@ BUILD_SRV = @BUILD_SHELL@
PROGRAMS = libback-shell.a
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = @LTHREAD_DEFS@
all-local: FORCE
$(MAKE) $(MFLAGS) libback-shell.a

View File

@ -44,7 +44,6 @@ build-ldbm: FORCE
ldbm-tools: $(PROGRAMS)
XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@
XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@
build-edb2ldif: FORCE

View File

@ -20,7 +20,6 @@ BUILD_SRV = @BUILD_SLURPD@
all-local: slurpd
XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@
XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@
slurpd: version.o