Fixes for NT dynamic linking.

This commit is contained in:
Howard Chu 1999-11-27 23:40:08 +00:00
parent 8b99e6cdbd
commit eaaea51b53
40 changed files with 781 additions and 935 deletions

View file

@ -31,17 +31,8 @@
* create a replacement and hope it works
*/
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLBER_DECL
# define LDAP_F_PRE extern __declspec(LIBLBER_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F(void) ber_pvt_assert LDAP_P((
const char *file, int line, const char *test ));
LIBLBER_F (void) ber_pvt_assert LDAP_P(( const char *file, int line,
const char *test ));
/* Can't use LDAP_STRING(test), that'd expand to "test" */
#if defined(__STDC__) || defined(__cplusplus)

View file

@ -25,8 +25,8 @@
# define sys_errlist ((char **)0)
#elif DECL_SYS_ERRLIST
/* have sys_errlist but need declaration */
extern int sys_nerr;
extern char *sys_errlist[];
LIBC_F (int) sys_nerr;
LIBC_F (char) *sys_errlist[];
#endif
#ifdef HAVE_STRERROR
@ -36,6 +36,6 @@
((err) > -1 && (err) < sys_nerr ? sys_errlist[(err)] : "unknown")
#endif
extern char* strerror_r();
LIBC_F (char *) strerror_r();
#endif /* _AC_ERRNO_H */

View file

@ -18,20 +18,11 @@
#if defined( HAVE_LIBUTIL_H )
# include <libutil.h>
#else
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
/* use lutil version */
LDAP_F(void) (setproctitle) LDAP_P((const char *fmt, ...)) \
LIBLUTIL_F (void) (setproctitle) LDAP_P((const char *fmt, ...)) \
LDAP_GCCATTR((format(printf, 1, 2)));
LDAP_F(int) Argc;
LDAP_F(char) **Argv;
LIBLUTIL_F (int) Argc;
LIBLUTIL_F (char) **Argv;
#endif
#endif /* LDAP_PROCTITLE */

View file

@ -88,7 +88,7 @@
#define sock_errno() WSAGetLastError()
#define sock_errstr(e) WSAGetErrorString(e)
extern char* WSAGetErrorString LDAP_P((int));
LIBLUTIL_F (char *) WSAGetErrorString LDAP_P((int));
#elif MACOS
# define tcp_close( s ) tcpclose( s )
@ -139,7 +139,7 @@ extern char* WSAGetErrorString LDAP_P((int));
#if !defined( HAVE_INET_ATON ) && !defined( inet_aton )
#define inet_aton ldap_pvt_inet_aton
struct in_addr;
LDAP_F( int ) ldap_pvt_inet_aton LDAP_P(( const char *, struct in_addr * ));
LIBLDAP_F (int) ldap_pvt_inet_aton LDAP_P(( const char *, struct in_addr * ));
#endif
#if defined(__WIN32) && defined(_ALPHA)

View file

@ -27,11 +27,11 @@
*/
#if defined(__MINGW32__) && defined(HAVE_SNPRINTF)
int snprintf(char *, size_t, const char *, ...);
LIBC_F (int) snprintf(char *, size_t, const char *, ...);
#endif
#if defined(__MINGW32__) && defined(HAVE_VSNPRINTF)
int vsnprintf(char *, size_t, const char *, va_list);
LIBC_F (int) vsnprintf(char *, size_t, const char *, va_list);
#endif
#endif /* _AC_STDARG_H */

View file

@ -42,21 +42,11 @@
# endif
#endif
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDAP_DECL
# define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
/* use ldap_pvt_strtok instead of strtok or strtok_r! */
LDAP_F(char *) ldap_pvt_strtok LDAP_P((
char *str, const char *delim, char **pos ));
LIBLDAP_F(char *) ldap_pvt_strtok LDAP_P(( char *str, const char *delim,
char **pos ));
LDAP_F(char *) ldap_pvt_strdup LDAP_P((
const char * s ));
LIBLDAP_F(char *) ldap_pvt_strdup LDAP_P(( const char * s ));
#ifndef HAVE_STRDUP
/* strdup() is missing, declare our own version */
@ -64,15 +54,17 @@ LDAP_F(char *) ldap_pvt_strdup LDAP_P((
# define strdup(s) ldap_pvt_strdup(s)
#else
/* some systems fail to declare strdup */
LDAP_F(char *) (strdup)();
LIBC_F(char *) (strdup)();
#endif
/*
* some systems fail to declare strcasecmp() and strncasecmp()
* we need them declared so we can obtain pointers to them
*/
LDAP_F(int) (strcasecmp)();
LDAP_F(int) (strncasecmp)();
/* In Mingw32, strcasecmp is not in the C library, so we don't LIBC_F it */
int (strcasecmp)();
int (strncasecmp)();
#ifndef SAFEMEMCPY
# if defined( HAVE_MEMMOVE )

View file

@ -27,19 +27,10 @@
/* note: callers of crypt(3) should include <ac/crypt.h> */
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
#ifndef HAVE_GETPASS
LDAP_F(char*)(getpass) LDAP_P((const char *getpass));
LIBLUTIL_F(char*)(getpass) LDAP_P((const char *getpass));
#else
LDAP_F(char*)(getpass)();
LIBC_F(char*)(getpass)();
#endif
/* getopt() defines may be in separate include file */
@ -52,21 +43,13 @@ LDAP_F(char*)(getpass)();
#else
/* assume we need to declare these externs */
extern char *optarg;
extern int optind, opterr, optopt;
LIBC_F (char *) optarg;
LIBC_F (int) optind, opterr, optopt;
#endif
#ifndef HAVE_TEMPNAM
LDAP_F(char *)(tempnam) LDAP_P((
const char *tmpdir,
const char *prefix));
#endif
/* This is never even checked for or implemented if not present */
#if 0
#ifndef HAVE_MKTEMP
LDAP_F(char *)(mktemp) LDAP_P((char *));
#endif
LIBLUTIL_F(char *)(tempnam) LDAP_P(( const char *tmpdir,
const char *prefix));
#endif
/* use lutil file locking */

View file

@ -61,48 +61,39 @@ typedef int (*AVL_CMP) LDAP_P((const void*, const void*));
typedef int (*AVL_DUP) LDAP_P((void*, void*));
typedef void (*AVL_FREE) LDAP_P((void*));
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBAVL_DECL
# define LDAP_F_PRE extern __declspec(LIBAVL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBAVL_F( int )
avl_free LDAP_P(( Avlnode *root, AVL_FREE dfree ));
LDAP_F( int )
LIBAVL_F( int )
avl_insert LDAP_P((Avlnode **, void*, AVL_CMP, AVL_DUP));
LDAP_F( void* )
LIBAVL_F( void* )
avl_delete LDAP_P((Avlnode **, void*, AVL_CMP));
LDAP_F( void* )
LIBAVL_F( void* )
avl_find LDAP_P((Avlnode *, const void*, AVL_CMP));
LDAP_F( void* )
LIBAVL_F( void* )
avl_find_lin LDAP_P((Avlnode *, const void*, AVL_CMP));
#ifdef AVL_NONREENTRANT
LDAP_F( void* )
LIBAVL_F( void* )
avl_getfirst LDAP_P((Avlnode *));
LDAP_F( void* )
LIBAVL_F( void* )
avl_getnext LDAP_P((void));
#endif
LDAP_F( int )
LIBAVL_F( int )
avl_dup_error LDAP_P((void*, void*));
LDAP_F( int )
LIBAVL_F( int )
avl_dup_ok LDAP_P((void*, void*));
LDAP_F( int )
LIBAVL_F( int )
avl_apply LDAP_P((Avlnode *, AVL_APPLY, void*, int, int));
LDAP_F( int )
LIBAVL_F( int )
avl_prefixapply LDAP_P((Avlnode *, void*, AVL_CMP, void*, AVL_CMP, void*, int));
/* apply traversal types */

View file

@ -225,97 +225,88 @@ struct ldap_disptmpl {
typedef int (*ldap_writeptype) LDAP_P((
void *writeparm, char *p, ber_len_t len ));
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDAP_DECL
# define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBLDAP_F( int )
ldap_init_templates LDAP_P(( char *file, struct ldap_disptmpl **tmpllistp ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_init_templates_buf LDAP_P(( char *buf,
ber_len_t buflen,
struct ldap_disptmpl **tmpllistp ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_free_templates LDAP_P(( struct ldap_disptmpl *tmpllist ));
LDAP_F( struct ldap_disptmpl * )
LIBLDAP_F( struct ldap_disptmpl * )
ldap_first_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist ));
LDAP_F( struct ldap_disptmpl * )
LIBLDAP_F( struct ldap_disptmpl * )
ldap_next_disptmpl LDAP_P(( struct ldap_disptmpl *tmpllist,
struct ldap_disptmpl *tmpl ));
LDAP_F( struct ldap_disptmpl * )
LIBLDAP_F( struct ldap_disptmpl * )
ldap_name2template LDAP_P(( char *name,
struct ldap_disptmpl *tmpllist ));
LDAP_F( struct ldap_disptmpl * )
LIBLDAP_F( struct ldap_disptmpl * )
ldap_oc2template LDAP_P(( char **oclist,
struct ldap_disptmpl *tmpllist ));
LDAP_F( char ** )
LIBLDAP_F( char ** )
ldap_tmplattrs LDAP_P(( struct ldap_disptmpl *tmpl,
char **includeattrs,
int exclude,
unsigned long syntaxmask ));
LDAP_F( struct ldap_tmplitem * )
LIBLDAP_F( struct ldap_tmplitem * )
ldap_first_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl ));
LDAP_F( struct ldap_tmplitem * )
LIBLDAP_F( struct ldap_tmplitem * )
ldap_next_tmplrow LDAP_P(( struct ldap_disptmpl *tmpl,
struct ldap_tmplitem *row ));
LDAP_F( struct ldap_tmplitem * )
LIBLDAP_F( struct ldap_tmplitem * )
ldap_first_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
struct ldap_tmplitem *row ));
LDAP_F( struct ldap_tmplitem * )
LIBLDAP_F( struct ldap_tmplitem * )
ldap_next_tmplcol LDAP_P(( struct ldap_disptmpl *tmpl,
struct ldap_tmplitem *row,
struct ldap_tmplitem *col ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_entry2text LDAP_P(( LDAP *ld,
char *buf, LDAPMessage *entry,
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_vals2text LDAP_P(( LDAP *ld,
char *buf, char **vals, char *label, int labelwidth,
unsigned long syntaxid, ldap_writeptype writeproc, void *writeparm,
char *eol, int rdncount ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_entry2text_search LDAP_P(( LDAP *ld,
char *dn, char *base, LDAPMessage *entry,
struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_entry2html LDAP_P(( LDAP *ld,
char *buf, LDAPMessage *entry,
struct ldap_disptmpl *tmpl, char **defattrs, char ***defvals,
ldap_writeptype writeproc, void *writeparm, char *eol, int rdncount,
unsigned long opts, char *urlprefix, char *base ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_vals2html LDAP_P(( LDAP *ld,
char *buf, char **vals, char *label, int labelwidth,
unsigned long syntaxid, ldap_writeptype writeproc, void *writeparm,
char *eol, int rdncount, char *urlprefix ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_entry2html_search LDAP_P(( LDAP
*ld, char *dn, char *base, LDAPMessage *entry,
struct ldap_disptmpl *tmpllist, char **defattrs, char ***defvals,

View file

@ -18,23 +18,10 @@
LDAP_BEGIN_DECL
extern char *optarg;
extern int optind, opterr, optopt;
LIBLUTIL_F (char *) optarg;
LIBLUTIL_F (int) optind, opterr, optopt;
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
getopt LDAP_P((
int,
char * const [],
const char *));
LIBLUTIL_F (int) getopt LDAP_P(( int, char * const [], const char *));
LDAP_END_DECL

View file

@ -151,31 +151,23 @@ typedef struct berval {
} BerValue;
/* this should be moved to lber-int.h */
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLBER_DECL
# define LDAP_F_PRE extern __declspec(LIBLBER_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
/*
* in bprint.c:
*/
LDAP_F( void )
LIBLBER_F( void )
ber_print_error LDAP_P((
LDAP_CONST char *data ));
LDAP_F( void )
LIBLBER_F( void )
ber_bprint LDAP_P((
LDAP_CONST char *data, ber_len_t len ));
LDAP_F( void )
LIBLBER_F( void )
ber_dump LDAP_P((
BerElement *ber, int inout ));
LDAP_F( void )
LIBLBER_F( void )
ber_sos_dump LDAP_P((
Seqorset *sos ));
@ -188,75 +180,75 @@ typedef int (*BERDecodeCallback) LDAP_P((
void *data,
int mode ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_tag LDAP_P((
BerElement *ber ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_skip_tag LDAP_P((
BerElement *ber,
ber_len_t *len ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_peek_tag LDAP_P((
BerElement *ber,
ber_len_t *len ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_int LDAP_P((
BerElement *ber,
ber_int_t *num ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_stringb LDAP_P((
BerElement *ber,
char *buf,
ber_len_t *len ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_stringa LDAP_P((
BerElement *ber,
char **buf ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_stringal LDAP_P((
BerElement *ber,
struct berval **bv ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_bitstringa LDAP_P((
BerElement *ber,
char **buf,
ber_len_t *len ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_null LDAP_P((
BerElement *ber ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_boolean LDAP_P((
BerElement *ber,
ber_int_t *boolval ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_first_element LDAP_P((
BerElement *ber,
ber_len_t *len,
char **last ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_next_element LDAP_P((
BerElement *ber,
ber_len_t *len,
LDAP_CONST char *last ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_scanf LDAP_P((
BerElement *ber,
LDAP_CONST char *fmt,
... ));
LDAP_F( void )
LIBLBER_F( void )
ber_set_string_translators LDAP_P((
BerElement *ber,
BERTranslateProc encode_proc,
@ -269,74 +261,74 @@ typedef int (*BEREncodeCallback) LDAP_P((
BerElement *ber,
void *data ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_enum LDAP_P((
BerElement *ber,
ber_int_t num,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_int LDAP_P((
BerElement *ber,
ber_int_t num,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_ostring LDAP_P((
BerElement *ber,
LDAP_CONST char *str,
ber_len_t len,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_berval LDAP_P((
BerElement *ber,
LDAP_CONST struct berval *bv,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_string LDAP_P((
BerElement *ber,
LDAP_CONST char *str,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_bitstring LDAP_P((
BerElement *ber,
LDAP_CONST char *str,
ber_len_t bitlen,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_null LDAP_P((
BerElement *ber,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_boolean LDAP_P((
BerElement *ber,
ber_int_t boolval,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_start_seq LDAP_P((
BerElement *ber,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_start_set LDAP_P((
BerElement *ber,
ber_tag_t tag ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_seq LDAP_P((
BerElement *ber ));
LDAP_F( int )
LIBLBER_F( int )
ber_put_set LDAP_P((
BerElement *ber ));
LDAP_F( int )
LIBLBER_F( int )
ber_printf LDAP_P((
BerElement *ber,
LDAP_CONST char *fmt,
@ -347,65 +339,65 @@ ber_printf LDAP_P((
* in io.c:
*/
LDAP_F( ber_slen_t )
LIBLBER_F( ber_slen_t )
ber_read LDAP_P((
BerElement *ber,
char *buf,
ber_len_t len ));
LDAP_F( ber_slen_t )
LIBLBER_F( ber_slen_t )
ber_write LDAP_P((
BerElement *ber,
LDAP_CONST char *buf,
ber_len_t len,
int nosos ));
LDAP_F( void )
LIBLBER_F( void )
ber_free LDAP_P((
BerElement *ber,
int freebuf ));
LDAP_F( int )
LIBLBER_F( int )
ber_flush LDAP_P((
Sockbuf *sb,
BerElement *ber,
int freeit ));
LDAP_F( BerElement * )
LIBLBER_F( BerElement * )
ber_alloc LDAP_P(( void )); /* DEPRECATED */
LDAP_F( BerElement * )
LIBLBER_F( BerElement * )
der_alloc LDAP_P(( void )); /* DEPRECATED */
LDAP_F( BerElement * )
LIBLBER_F( BerElement * )
ber_alloc_t LDAP_P((
int beroptions ));
LDAP_F( BerElement * )
LIBLBER_F( BerElement * )
ber_dup LDAP_P((
BerElement *ber ));
LDAP_F( ber_tag_t )
LIBLBER_F( ber_tag_t )
ber_get_next LDAP_P((
Sockbuf *sb,
ber_len_t *len,
BerElement *ber ));
LDAP_F( void )
LIBLBER_F( void )
ber_init_w_nullc LDAP_P((
BerElement *ber,
int options ));
LDAP_F( void )
LIBLBER_F( void )
ber_reset LDAP_P((
BerElement *ber,
int was_writing ));
LDAP_F( BerElement * )
LIBLBER_F( BerElement * )
ber_init LDAP_P((
struct berval *bv ));
LDAP_F( int )
LIBLBER_F( int )
ber_flatten LDAP_P((
BerElement *ber,
struct berval **bvPtr ));
@ -414,13 +406,13 @@ ber_flatten LDAP_P((
* LBER ber accessor functions
*/
LDAP_F( int )
LIBLBER_F( int )
ber_get_option LDAP_P((
void *item,
int option,
void *outvalue));
LDAP_F( int )
LIBLBER_F( int )
ber_set_option LDAP_P((
void *item,
int option,
@ -430,62 +422,62 @@ ber_set_option LDAP_P((
* LBER sockbuf.c
*/
LDAP_F( Sockbuf * )
LIBLBER_F( Sockbuf * )
ber_sockbuf_alloc( void );
LDAP_F( Sockbuf * )
LIBLBER_F( Sockbuf * )
ber_sockbuf_alloc_fd(
ber_socket_t fd );
LDAP_F( void )
LIBLBER_F( void )
ber_sockbuf_free(
Sockbuf *sb );
/*
* LBER memory.c
*/
LDAP_F( void * )
LIBLBER_F( void * )
ber_memalloc LDAP_P((
ber_len_t s ));
LDAP_F( void * )
LIBLBER_F( void * )
ber_memrealloc LDAP_P((
void* p,
ber_len_t s ));
LDAP_F( void * )
LIBLBER_F( void * )
ber_memcalloc LDAP_P((
ber_len_t n,
ber_len_t s ));
LDAP_F( void )
LIBLBER_F( void )
ber_memfree LDAP_P((
void* p ));
LDAP_F( void )
LIBLBER_F( void )
ber_memvfree LDAP_P((
void** vector ));
LDAP_F( void )
LIBLBER_F( void )
ber_bvfree LDAP_P((
struct berval *bv ));
LDAP_F( void )
LIBLBER_F( void )
ber_bvecfree LDAP_P((
struct berval **bv ));
LDAP_F( struct berval * )
LIBLBER_F( struct berval * )
ber_bvdup LDAP_P((
LDAP_CONST struct berval *bv ));
LDAP_F( char * )
LIBLBER_F( char * )
ber_strdup LDAP_P((
LDAP_CONST char * ));
/*
* error.c
*/
LDAP_F( int * ) ber_errno_addr LDAP_P((void));
LIBLBER_F( int * ) ber_errno_addr LDAP_P((void));
#define ber_errno (*(ber_errno_addr)())
#define LBER_ERROR_NONE 0
@ -494,4 +486,4 @@ LDAP_F( int * ) ber_errno_addr LDAP_P((void));
LDAP_END_DECL
#endif /* _LBER_H */
#endif /* _LBER_H */

View file

@ -20,21 +20,12 @@
LDAP_BEGIN_DECL
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLBER_DECL
# define LDAP_F_PRE extern __declspec(LIBLBER_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
/*
* bprint.c
*/
LDAP_F( BER_LOG_PRINT_FN ) ber_pvt_log_print;
LIBLBER_F( BER_LOG_PRINT_FN ) ber_pvt_log_print;
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_log_printf LDAP_P((
int errlvl,
int loglvl,

File diff suppressed because it is too large Load diff

View file

@ -62,17 +62,67 @@
# define LDAP_GCCATTR(attrs)
#endif
/* Proper support for NT dynamic libraries. */
/*
* C library. Mingw32 links with the C run-time library by default,
* so the explicit definition of CSTATIC will keep dllimport from
* being defined.
*/
#if (defined(__MINGW32__) && !defined(CSTATIC) || \
defined(_WIN32) && defined(_DLL))
# define LIBC_F(type) extern __declspec(dllimport) type
#else
# define LIBC_F(type) extern type
#endif
/* AVL library */
#if defined(LIBAVL_DECL) && defined(_WIN32)
# define LIBAVL_F(type) extern __declspec(LIBAVL_DECL) type
#else
# define LIBAVL_F(type) extern type
#endif
/* LBER library */
#if defined(LIBLBER_DECL) && defined(_WIN32)
# define LIBLBER_F(type) extern __declspec(LIBLBER_DECL) type
#else
# define LIBLBER_F(type) extern type
#endif
/* LDAP library */
#if defined(LIBLDAP_DECL) && defined(_WIN32)
# define LIBLDAP_F(type) extern __declspec(LIBLDAP_DECL) type
#else
# define LIBLDAP_F(type) extern type
#endif
/* LDBM library */
#if defined(LIBLDBM_DECL) && defined(_WIN32)
# define LIBLDBM_F(type) extern __declspec(LIBLDBM_DECL) type
#else
# define LIBLDBM_F(type) extern type
#endif
/* LDIF library */
#if defined(LIBLDIF_DECL) && defined(_WIN32)
# define LIBLDIF_F(type) extern __declspec(LIBLDIF_DECL) type
#else
# define LIBLDIF_F(type) extern type
#endif
/* LUTIL library */
#if defined(LIBLUTIL_DECL) && defined(_WIN32)
# define LIBLUTIL_F(type) extern __declspec(LIBLUTIL_DECL) type
#else
# define LIBLUTIL_F(type) extern type
#endif
/* SLAPD (as a module exporting symbols */
#if defined(LIBSLAPD_DECL) && defined(_WIN32)
# define LIBSLAPD_F(type) extern __declspec(LIBSLAPD_DECL) type
#else
# define LIBSLAPD_F(type) extern type
#endif
#endif /* _LDAP_CDEFS_H */
/* purposely allow these to be redefined */
#ifndef LDAP_F_PRE
# define LDAP_F_PRE LDAP_F_IMPORT
#endif
#ifndef LDAP_F_POST
# define LDAP_F_POST /* no post */
#endif
#ifndef LDAP_F
#define LDAP_F(type) LDAP_F_PRE type LDAP_F_POST
#endif

View file

@ -47,6 +47,10 @@ LDAP_BEGIN_DECL
/* debugging stuff */
#ifdef LDAP_DEBUG
/*
* This is a bogus extern declaration for the compiler. No need to ensure
* a 'proper' dllimport.
*/
#ifndef ldap_debug
extern int ldap_debug;
#endif /* !ldap_debug */
@ -74,16 +78,7 @@ extern int ldap_syslog_level;
#define Debug( level, fmt, arg1, arg2, arg3 )
#endif /* LDAP_DEBUG */
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F(void) lutil_debug LDAP_P((
LIBLUTIL_F(void) lutil_debug LDAP_P((
int debug, int level,
const char* fmt, ... )) LDAP_GCCATTR((format(printf, 3, 4)));

View file

@ -23,21 +23,12 @@ LDAP_BEGIN_DECL
struct hostent; /* avoid pulling in <netdb.h> */
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDAP_DECL
# define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( char * )
LIBLDAP_F( char * )
ldap_pvt_ctime LDAP_P((
const time_t *tp,
char *buf ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_gethostbyname_a LDAP_P((
const char *name,
struct hostent *resbuf,
@ -45,7 +36,7 @@ ldap_pvt_gethostbyname_a LDAP_P((
struct hostent **result,
int *herrno_ptr ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_gethostbyaddr_a LDAP_P((
const char *addr,
int len,
@ -58,35 +49,35 @@ ldap_pvt_gethostbyaddr_a LDAP_P((
/* charray.c */
LDAP_F( int )
LIBLDAP_F( int )
ldap_charray_add LDAP_P((
char ***a,
char *s ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_charray_merge LDAP_P((
char ***a,
char **s ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_charray_free LDAP_P(( char **a ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_charray_inlist LDAP_P((
char **a,
char *s ));
LDAP_F( char ** )
LIBLDAP_F( char ** )
ldap_charray_dup LDAP_P(( char **a ));
LDAP_F( char ** )
LIBLDAP_F( char ** )
ldap_str2charray LDAP_P((
char *str,
char *brkstr ));
/* url.c */
void ldap_pvt_hex_unescape LDAP_P(( char *s ));
int ldap_pvt_unhex( int c );
LIBLDAP_F (void) ldap_pvt_hex_unescape LDAP_P(( char *s ));
LIBLDAP_F (int) ldap_pvt_unhex( int c );
/* these macros assume 'x' is an ASCII x */
#define LDAP_DNSEPARATOR(c) ((c) == ',' || (c) == ';')
@ -110,28 +101,28 @@ int ldap_pvt_unhex( int c );
#define LDAP_NEEDSESCAPE(c) ((c) == '\\' || (c) == '"')
/* search.c */
LDAP_F( char * )
LIBLDAP_F( char * )
ldap_pvt_find_wildcard LDAP_P(( char *s ));
LDAP_F( ber_slen_t )
LIBLDAP_F( ber_slen_t )
ldap_pvt_filter_value_unescape LDAP_P(( char *filter ));
/* string.c */
LDAP_F( char * )
LIBLDAP_F( char * )
ldap_pvt_str2upper LDAP_P(( char *str ));
LDAP_F( char * )
LIBLDAP_F( char * )
ldap_pvt_str2lower LDAP_P(( char *str ));
/* tls.c */
struct ldapoptions;
int ldap_pvt_tls_init LDAP_P(( void ));
int ldap_pvt_tls_config LDAP_P(( struct ldapoptions *lo, int option, const char *arg ));
int ldap_pvt_tls_connect LDAP_P(( Sockbuf *sb, void *ctx_arg ));
int ldap_pvt_tls_accept LDAP_P(( Sockbuf *sb, void *ctx_arg ));
int ldap_pvt_tls_get_option LDAP_P(( struct ldapoptions *lo, int option, void *arg ));
int ldap_pvt_tls_set_option LDAP_P(( struct ldapoptions *lo, int option, void *arg ));
LIBLDAP_F (int) ldap_pvt_tls_init LDAP_P(( void ));
LIBLDAP_F (int) ldap_pvt_tls_config LDAP_P(( struct ldapoptions *lo, int option, const char *arg ));
LIBLDAP_F (int) ldap_pvt_tls_connect LDAP_P(( Sockbuf *sb, void *ctx_arg ));
LIBLDAP_F (int) ldap_pvt_tls_accept LDAP_P(( Sockbuf *sb, void *ctx_arg ));
LIBLDAP_F (int) ldap_pvt_tls_get_option LDAP_P(( struct ldapoptions *lo, int option, void *arg ));
LIBLDAP_F (int) ldap_pvt_tls_set_option LDAP_P(( struct ldapoptions *lo, int option, void *arg ));
LDAP_END_DECL

View file

@ -175,26 +175,17 @@ LDAP_END_DECL
LDAP_BEGIN_DECL
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDAP_DECL
# define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_initialize LDAP_P(( void ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_destroy LDAP_P(( void ));
LDAP_F( unsigned int )
LIBLDAP_F( unsigned int )
ldap_pvt_thread_sleep LDAP_P(( unsigned int s ));
#ifdef HAVE_GETCONCURRENCY
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_get_concurrency LDAP_P(( void ));
#endif
@ -203,62 +194,62 @@ ldap_pvt_thread_get_concurrency LDAP_P(( void ));
/* three concurrent threads should be enough */
# define LDAP_THREAD_CONCURRENCY 3
# endif
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_set_concurrency LDAP_P(( int ));
#endif
#define LDAP_PVT_THREAD_CREATE_JOINABLE 0
#define LDAP_PVT_THREAD_CREATE_DETACHED 1
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_create LDAP_P((
ldap_pvt_thread_t * thread,
int detach,
void *(*start_routine)( void * ),
void *arg));
LDAP_F( void )
LIBLDAP_F( void )
ldap_pvt_thread_exit LDAP_P(( void *retval ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_join LDAP_P(( ldap_pvt_thread_t thread, void **status ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_kill LDAP_P(( ldap_pvt_thread_t thread, int signo ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_yield LDAP_P(( void ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_cond_init LDAP_P(( ldap_pvt_thread_cond_t *cond ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_cond_destroy LDAP_P(( ldap_pvt_thread_cond_t *cond ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_cond_signal LDAP_P(( ldap_pvt_thread_cond_t *cond ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_cond_broadcast LDAP_P(( ldap_pvt_thread_cond_t *cond ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_cond_wait LDAP_P((
ldap_pvt_thread_cond_t *cond,
ldap_pvt_thread_mutex_t *mutex ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_mutex_init LDAP_P(( ldap_pvt_thread_mutex_t *mutex ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_mutex_destroy LDAP_P(( ldap_pvt_thread_mutex_t *mutex ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_mutex_lock LDAP_P(( ldap_pvt_thread_mutex_t *mutex ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_mutex_trylock LDAP_P(( ldap_pvt_thread_mutex_t *mutex ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_mutex_unlock LDAP_P(( ldap_pvt_thread_mutex_t *mutex ));
typedef struct ldap_pvt_thread_rdwr_var {
@ -273,38 +264,38 @@ typedef struct ldap_pvt_thread_rdwr_var {
int ltrw_w_wait;
} ldap_pvt_thread_rdwr_t;
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_init LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_destroy LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_rlock LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_rtrylock LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_runlock LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_wlock LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_wtrylock LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_wunlock LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
#ifdef LDAP_DEBUG
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_readers LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_writers LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
LDAP_F( int )
LIBLDAP_F( int )
ldap_pvt_thread_rdwr_active LDAP_P((ldap_pvt_thread_rdwr_t *rdwrp));
#endif /* LDAP_DEBUG */

View file

@ -87,88 +87,79 @@ typedef struct ldap_objectclass {
#define LDAP_SCHEMA_STRUCTURAL 1
#define LDAP_SCHEMA_AUXILIARY 2
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDAP_DECL
# define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( LDAP_CONST char * )
LIBLDAP_F( LDAP_CONST char * )
ldap_syntax2name LDAP_P((
LDAP_SYNTAX * syn ));
LDAP_F( LDAP_CONST char * )
LIBLDAP_F( LDAP_CONST char * )
ldap_matchingrule2name LDAP_P((
LDAP_MATCHING_RULE * mr ));
LDAP_F( LDAP_CONST char * )
LIBLDAP_F( LDAP_CONST char * )
ldap_attributetype2name LDAP_P((
LDAP_ATTRIBUTE_TYPE * at ));
LDAP_F( LDAP_CONST char * )
LIBLDAP_F( LDAP_CONST char * )
ldap_objectclass2name LDAP_P((
LDAP_OBJECT_CLASS * oc ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_syntax_free LDAP_P((
LDAP_SYNTAX * syn ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_matchingrule_free LDAP_P((
LDAP_MATCHING_RULE * mr ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_attributetype_free LDAP_P((
LDAP_ATTRIBUTE_TYPE * at ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_objectclass_free LDAP_P((
LDAP_OBJECT_CLASS * oc ));
LDAP_F( LDAP_OBJECT_CLASS * )
LIBLDAP_F( LDAP_OBJECT_CLASS * )
ldap_str2objectclass LDAP_P((
LDAP_CONST char * s,
int * code,
LDAP_CONST char ** errp ));
LDAP_F( LDAP_ATTRIBUTE_TYPE * )
LIBLDAP_F( LDAP_ATTRIBUTE_TYPE * )
ldap_str2attributetype LDAP_P((
LDAP_CONST char * s,
int * code,
LDAP_CONST char ** errp ));
LDAP_F( LDAP_SYNTAX * )
LIBLDAP_F( LDAP_SYNTAX * )
ldap_str2syntax LDAP_P((
LDAP_CONST char * s,
int * code,
LDAP_CONST char ** errp ));
LDAP_F( LDAP_MATCHING_RULE * )
LIBLDAP_F( LDAP_MATCHING_RULE * )
ldap_str2matchingrule LDAP_P((
LDAP_CONST char * s,
int * code,
LDAP_CONST char ** errp ));
LDAP_F( char *)
LIBLDAP_F( char *)
ldap_objectclass2str LDAP_P((
LDAP_CONST LDAP_OBJECT_CLASS * oc ));
LDAP_F( char *)
LIBLDAP_F( char *)
ldap_attributetype2str LDAP_P((
LDAP_CONST LDAP_ATTRIBUTE_TYPE * at ));
LDAP_F( char *)
LIBLDAP_F( char *)
ldap_syntax2str LDAP_P((
LDAP_CONST LDAP_SYNTAX * syn ));
LDAP_F( char *)
LIBLDAP_F( char *)
ldap_matchingrule2str LDAP_P((
LDAP_CONST LDAP_MATCHING_RULE * mr ));
LDAP_F( char *)
LIBLDAP_F( char *)
ldap_scherr2str LDAP_P((
int code )) LDAP_GCCATTR((const));

View file

@ -225,25 +225,25 @@ LDAP_END_DECL
LDAP_BEGIN_DECL
int ldbm_initialize( void );
int ldbm_shutdown( void );
LIBLDBM_F (int) ldbm_initialize( void );
LIBLDBM_F (int) ldbm_shutdown( void );
int ldbm_errno( LDBM ldbm );
LDBM ldbm_open( char *name, int rw, int mode, int dbcachesize );
void ldbm_close( LDBM ldbm );
void ldbm_sync( LDBM ldbm );
void ldbm_datum_free( LDBM ldbm, Datum data );
Datum ldbm_datum_dup( LDBM ldbm, Datum data );
Datum ldbm_fetch( LDBM ldbm, Datum key );
int ldbm_store( LDBM ldbm, Datum key, Datum data, int flags );
int ldbm_delete( LDBM ldbm, Datum key );
LIBLDBM_F (int) ldbm_errno( LDBM ldbm );
LIBLDBM_F (LDBM) ldbm_open( char *name, int rw, int mode, int dbcachesize );
LIBLDBM_F (void) ldbm_close( LDBM ldbm );
LIBLDBM_F (void) ldbm_sync( LDBM ldbm );
LIBLDBM_F (void) ldbm_datum_free( LDBM ldbm, Datum data );
LIBLDBM_F (Datum) ldbm_datum_dup( LDBM ldbm, Datum data );
LIBLDBM_F (Datum) ldbm_fetch( LDBM ldbm, Datum key );
LIBLDBM_F (int) ldbm_store( LDBM ldbm, Datum key, Datum data, int flags );
LIBLDBM_F (int) ldbm_delete( LDBM ldbm, Datum key );
Datum ldbm_firstkey( LDBM ldbm, LDBMCursor **cursor );
Datum ldbm_nextkey( LDBM ldbm, Datum key, LDBMCursor *cursor );
LIBLDBM_F (Datum) ldbm_firstkey( LDBM ldbm, LDBMCursor **cursor );
LIBLDBM_F (Datum) ldbm_nextkey( LDBM ldbm, Datum key, LDBMCursor *cursor );
/* initialization of Datum structures */
#ifdef HAVE_BERKELEY_DB2
void *ldbm_malloc( size_t size );
LIBLDBM_F (void *) ldbm_malloc( size_t size );
# define ldbm_datum_init(d) ((void)memset(&(d), 0, sizeof(Datum)))
#else
# define ldbm_datum_init(d) ((void)0)

View file

@ -27,7 +27,8 @@
LDAP_BEGIN_DECL
extern int ldif_debug;
/* This is NOT a bogus extern declaration (unlike ldap_debug) */
LIBLDIF_F (int) ldif_debug;
#define LDIF_LINE_WIDTH 76 /* maximum length of LDIF lines */
@ -48,32 +49,23 @@ extern int ldif_debug;
((nlen) + 4 + LDIF_BASE64_LEN(vlen) \
+ ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / LDIF_LINE_WIDTH * 2 ))
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDIF_DECL
# define LDAP_F_PRE extern __declspec(LIBLDIF_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBLDIF_F( int )
ldif_parse_line LDAP_P((
LDAP_CONST char *line,
char **name,
char **value,
ber_len_t *vlen ));
LDAP_F( int )
LIBLDIF_F( int )
ldif_fetch_url LDAP_P((
LDAP_CONST char *line,
char **value,
ber_len_t *vlen ));
LDAP_F( char * )
LIBLDIF_F( char * )
ldif_getline LDAP_P(( char **next ));
LDAP_F( int )
LIBLDIF_F( int )
ldif_read_record LDAP_P((
FILE *fp,
int *lineno,
@ -91,7 +83,7 @@ ldif_read_record LDAP_P((
#define LDIF_PUT_URL 0x0020 /* url */
#define LDIF_PUT_SEP 0x0040 /* separator */
LDAP_F( void )
LIBLDIF_F( void )
ldif_sput LDAP_P((
char **out,
int type,
@ -99,14 +91,14 @@ ldif_sput LDAP_P((
LDAP_CONST char *val,
ber_len_t vlen ));
LDAP_F( char * )
LIBLDIF_F( char * )
ldif_put LDAP_P((
int type,
LDAP_CONST char *name,
LDAP_CONST char *val,
ber_len_t vlen ));
LDAP_F( int )
LIBLDIF_F( int )
ldif_is_not_printable LDAP_P((
LDAP_CONST char *val,
ber_len_t vlen ));

View file

@ -21,15 +21,6 @@
LDAP_BEGIN_DECL
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
/* n octets encode into ceiling(n/3) * 4 bytes */
/* Avoid floating point math by through extra padding */
@ -39,52 +30,52 @@ LDAP_BEGIN_DECL
/* ISC Base64 Routines */
/* base64.c */
LDAP_F( int )
LIBLUTIL_F( int )
lutil_b64_ntop LDAP_P((
unsigned char const *,
size_t,
char *,
size_t));
LDAP_F( int )
LIBLUTIL_F( int )
lutil_b64_pton LDAP_P((
char const *,
unsigned char *,
size_t));
/* detach.c */
LDAP_F( void )
LIBLUTIL_F( void )
lutil_detach LDAP_P((
int debug,
int do_close));
/* entropy.c */
LDAP_F( int )
LIBLUTIL_F( int )
lutil_entropy LDAP_P((
char *buf,
int nbytes ));
/* passwd.c */
LDAP_F( int )
LIBLUTIL_F( int )
lutil_passwd LDAP_P((
const char *cred,
const char *passwd,
const char **methods ));
extern const char* lutil_passwd_schemes[];
LIBLUTIL_F (const char *) lutil_passwd_schemes[];
LDAP_F( int )
LIBLUTIL_F( int )
lutil_passwd_scheme LDAP_P((char *scheme));
/* utils.c */
LDAP_F( char* )
LIBLUTIL_F( char* )
lutil_progname LDAP_P((
const char* name,
int argc,
char *argv[] ));
/* sockpair.c */
LDAP_F( int )
LIBLUTIL_F( int )
lutil_pair( LBER_SOCKET_T sd[2] );
LDAP_END_DECL

View file

@ -19,19 +19,10 @@
LDAP_BEGIN_DECL
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBLUTIL_F( int )
lutil_lockf LDAP_P(( int fd ));
LDAP_F( int )
LIBLUTIL_F( int )
lutil_unlockf LDAP_P(( int fd ));
LDAP_END_DECL

View file

@ -30,31 +30,22 @@ struct lutil_MD5Context {
unsigned char in[64];
};
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( void )
LIBLUTIL_F( void )
lutil_MD5Init LDAP_P((
struct lutil_MD5Context *context));
LDAP_F( void )
LIBLUTIL_F( void )
lutil_MD5Update LDAP_P((
struct lutil_MD5Context *context,
unsigned char const *buf,
ber_len_t len));
LDAP_F( void )
LIBLUTIL_F( void )
lutil_MD5Final LDAP_P((
unsigned char digest[16],
struct lutil_MD5Context *context));
LDAP_F( void )
LIBLUTIL_F( void )
lutil_MD5Transform LDAP_P((
ber_uint_t buf[4],
const unsigned char in[64]));

View file

@ -34,40 +34,31 @@ typedef struct {
unsigned char buffer[64];
} lutil_SHA1_CTX;
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLUTIL_DECL
# define LDAP_F_PRE extern __declspec(LIBLUTIL_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( void )
LIBLUTIL_F( void )
lutil_SHA1Transform
LDAP_P((uint32 state[5], const unsigned char buffer[64]));
LDAP_F( void )
LIBLUTIL_F( void )
lutil_SHA1Init
LDAP_P((lutil_SHA1_CTX *context));
LDAP_F( void )
LIBLUTIL_F( void )
lutil_SHA1Update
LDAP_P((lutil_SHA1_CTX *context, const unsigned char *data, uint32 len));
LDAP_F( void )
LIBLUTIL_F( void )
lutil_SHA1Final
LDAP_P((unsigned char digest[20], lutil_SHA1_CTX *context));
LDAP_F( char * )
LIBLUTIL_F( char * )
lutil_SHA1End
LDAP_P((lutil_SHA1_CTX *, char *));
LDAP_F( char * )
LIBLUTIL_F( char * )
lutil_SHA1File
LDAP_P((char *, char *));
LDAP_F( char * )
LIBLUTIL_F( char * )
lutil_SHA1Data
LDAP_P((const unsigned char *, size_t, char *));

View file

@ -78,31 +78,22 @@ struct ldap_searchobj {
#define LDAP_SEARCHPREF_ERR_FILE 4
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLDAP_DECL
# define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBLDAP_F( int )
ldap_init_searchprefs LDAP_P(( char *file,
struct ldap_searchobj **solistp ));
LDAP_F( int )
LIBLDAP_F( int )
ldap_init_searchprefs_buf LDAP_P(( char *buf,
ber_len_t buflen,
struct ldap_searchobj **solistp ));
LDAP_F( void )
LIBLDAP_F( void )
ldap_free_searchprefs LDAP_P(( struct ldap_searchobj *solist ));
LDAP_F( struct ldap_searchobj * )
LIBLDAP_F( struct ldap_searchobj * )
ldap_first_searchobj LDAP_P(( struct ldap_searchobj *solist ));
LDAP_F( struct ldap_searchobj * )
LIBLDAP_F( struct ldap_searchobj * )
ldap_next_searchobj LDAP_P(( struct ldap_searchobj *sollist,
struct ldap_searchobj *so ));

View file

@ -24,7 +24,6 @@ XXLIBS =
LINKAGE = @LT_LIB_LINKAGE@
NT_DYN_LIB_DEFS = -DLIBLBER_DECL=dllexport
NT_DYN_TEST_DEFS = -DLIBLBER_DECL=dllimport
# Extras for building the library

View file

@ -24,7 +24,7 @@
LDAP_BEGIN_DECL
extern BER_ERRNO_FN ber_int_errno_fn;
LIBLBER_F (BER_ERRNO_FN) ber_int_errno_fn;
struct lber_options {
short lbo_valid;
@ -37,7 +37,7 @@ struct lber_options {
int lbo_debug;
};
extern struct lber_options ber_int_options;
LIBLBER_F (struct lber_options) ber_int_options;
#define ber_int_debug ber_int_options.lbo_debug
struct berelement {
@ -98,8 +98,8 @@ typedef struct sockbuf_io Sockbuf_IO;
typedef struct sockbuf_sec Sockbuf_Sec;
typedef struct sockbuf_buf Sockbuf_Buf;
LDAP_F( Sockbuf_IO ) ber_pvt_sb_io_tcp;
LDAP_F( Sockbuf_IO ) ber_pvt_sb_io_udp;
LIBLBER_F( Sockbuf_IO ) ber_pvt_sb_io_tcp;
LIBLBER_F( Sockbuf_IO ) ber_pvt_sb_io_udp;
struct sockbuf {
@ -180,30 +180,21 @@ struct seqorset {
*/
#define ber_log_printf ber_pvt_log_printf
#ifdef __MINGW32__
# undef LDAP_F_PRE
# ifdef LIBLBER_DECL
# define LDAP_F_PRE extern __declspec(LIBLBER_DECL)
# else
# define LDAP_F_PRE extern
# endif
#endif
LDAP_F( int )
LIBLBER_F( int )
ber_log_bprint LDAP_P((
int errlvl,
int loglvl,
const char *data,
ber_len_t len ));
LDAP_F( int )
LIBLBER_F( int )
ber_log_dump LDAP_P((
int errlvl,
int loglvl,
BerElement *ber,
int inout ));
LDAP_F( int )
LIBLBER_F( int )
ber_log_sos_dump LDAP_P((
int errlvl,
int loglvl,
@ -212,7 +203,7 @@ ber_log_sos_dump LDAP_P((
/* memory.c */
/* simple macros to realloc for now */
extern BerMemoryFunctions* ber_int_memory_fns;
LIBLBER_F (BerMemoryFunctions *) ber_int_memory_fns;
#ifdef CSRIMALLOC
#define LBER_INT_MALLOC malloc
@ -249,48 +240,48 @@ extern BerMemoryFunctions* ber_int_memory_fns;
/* these should be ber_int*() functions */
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_init LDAP_P(( Sockbuf *sb ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_destroy LDAP_P(( Sockbuf *sb ));
#ifdef USE_SASL
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_set_sec LDAP_P(( Sockbuf *sb, Sockbuf_Sec *sec, void *arg ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_clear_sec LDAP_P(( Sockbuf *sb ));
#endif
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_set_io LDAP_P(( Sockbuf *sb, Sockbuf_IO *layer, void *arg ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_clear_io LDAP_P(( Sockbuf *sb ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_close LDAP_P((Sockbuf *sb ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_set_nonblock LDAP_P(( Sockbuf *sb, int nb ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_set_readahead LDAP_P(( Sockbuf *sb, int rh ));
LDAP_F( ber_slen_t )
LIBLBER_F( ber_slen_t )
ber_pvt_sb_read LDAP_P(( Sockbuf *sb, void *buf, ber_len_t len ));
LDAP_F( ber_slen_t )
LIBLBER_F( ber_slen_t )
ber_pvt_sb_write LDAP_P(( Sockbuf *sb, void *buf, ber_len_t len ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_sb_udp_set_dst LDAP_P((Sockbuf *sb, void *addr ));
LDAP_F( void * )
LIBLBER_F( void * )
ber_pvt_sb_udp_get_src LDAP_P((Sockbuf *sb ));
LDAP_F( int )
LIBLBER_F( int )
ber_pvt_socket_set_nonblock LDAP_P(( ber_socket_t sd, int nb ));
#endif /* _LBER_INT_H */

View file

@ -37,7 +37,7 @@ XXLIBS = $(SECURITY_LIBS) $(TLS_LIBS)
LINKAGE = @LT_LIB_LINKAGE@
NT_DYN_LIB_LIBS = -llber $(AC_LIBS)
NT_DYN_LIB_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllexport
NT_DYN_LIB_DEFS = -DLIBLBER_DECL=dllimport
NT_DYN_TEST_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
# Extras for building the library

View file

@ -271,8 +271,8 @@ struct ldap {
* in init.c
*/
LDAP_F ( struct ldapoptions ) ldap_int_global_options;
void ldap_int_initialize LDAP_P((void));
LIBLDAP_F ( struct ldapoptions ) ldap_int_global_options;
LIBLDAP_F ( void ) ldap_int_initialize LDAP_P((void));
/* memory.c */
@ -294,37 +294,36 @@ void ldap_int_initialize LDAP_P((void));
/*
* in unit-int.c
*/
void ldap_int_utils_init LDAP_P(( void ));
LIBLDAP_F (void) ldap_int_utils_init LDAP_P(( void ));
/*
* in print.c
*/
int ldap_log_printf LDAP_P((LDAP *ld, int level, const char *fmt, ...))
LDAP_GCCATTR((format(printf, 3, 4)));
LIBLDAP_F (int) ldap_log_printf LDAP_P((LDAP *ld, int level, const char *fmt, ...)) LDAP_GCCATTR((format(printf, 3, 4)));
/*
* in cache.c
*/
void ldap_add_request_to_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype,
LIBLDAP_F (void) ldap_add_request_to_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype,
BerElement *request ));
void ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result ));
int ldap_check_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype, BerElement *request ));
LIBLDAP_F (void) ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result ));
LIBLDAP_F (int) ldap_check_cache LDAP_P(( LDAP *ld, ber_tag_t msgtype, BerElement *request ));
/*
* in controls.c
*/
LDAPControl *ldap_control_dup LDAP_P((
LIBLDAP_F (LDAPControl *) ldap_control_dup LDAP_P((
const LDAPControl *ctrl ));
LDAPControl **ldap_controls_dup LDAP_P((
LIBLDAP_F (LDAPControl **) ldap_controls_dup LDAP_P((
LDAPControl *const *ctrls ));
int ldap_int_get_controls LDAP_P((
LIBLDAP_F (int) ldap_int_get_controls LDAP_P((
BerElement *be,
LDAPControl ***ctrlsp));
int ldap_int_put_controls LDAP_P((
LIBLDAP_F (int) ldap_int_put_controls LDAP_P((
LDAP *ld,
LDAPControl *const *ctrls,
BerElement *ber ));
@ -332,14 +331,14 @@ int ldap_int_put_controls LDAP_P((
/*
* in dsparse.c
*/
int next_line_tokens LDAP_P(( char **bufp, ber_len_t *blenp, char ***toksp ));
void free_strarray LDAP_P(( char **sap ));
LIBLDAP_F (int) next_line_tokens LDAP_P(( char **bufp, ber_len_t *blenp, char ***toksp ));
LIBLDAP_F (void) free_strarray LDAP_P(( char **sap ));
#ifdef HAVE_KERBEROS
/*
* in kerberos.c
*/
char *ldap_get_kerberosv4_credentials LDAP_P((
LIBLDAP_F (char *) ldap_get_kerberosv4_credentials LDAP_P((
LDAP *ld,
LDAP_CONST char *who,
LDAP_CONST char *service,
@ -351,69 +350,64 @@ char *ldap_get_kerberosv4_credentials LDAP_P((
/*
* in open.c
*/
int ldap_open_defconn( LDAP *ld );
int open_ldap_connection( LDAP *ld, Sockbuf *sb, const char *host, int defport,
char **krbinstancep, int async );
LIBLDAP_F (int) ldap_open_defconn( LDAP *ld );
LIBLDAP_F (int) open_ldap_connection( LDAP *ld, Sockbuf *sb, const char *host, int defport, char **krbinstancep, int async );
/*
* in os-ip.c
*/
extern int ldap_int_tblsize;
int ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
int ldap_connect_to_host( LDAP *ld, Sockbuf *sb, const char *host,
unsigned long address, int port, int async );
LIBLDAP_F (int) ldap_int_tblsize;
LIBLDAP_F (int) ldap_int_timeval_dup( struct timeval **dest, const struct timeval *tm );
LIBLDAP_F (int) ldap_connect_to_host( LDAP *ld, Sockbuf *sb, const char *host, unsigned long address, int port, int async );
void ldap_close_connection( Sockbuf *sb );
LIBLDAP_F (void) ldap_close_connection( Sockbuf *sb );
#ifdef HAVE_KERBEROS
char *ldap_host_connected_to( Sockbuf *sb );
LIBLDAP_F (char *) ldap_host_connected_to( Sockbuf *sb );
#endif /* HAVE_KERBEROS */
void ldap_int_ip_init( void );
int do_ldap_select( LDAP *ld, struct timeval *timeout );
void *ldap_new_select_info( void );
void ldap_free_select_info( void *sip );
void ldap_mark_select_write( LDAP *ld, Sockbuf *sb );
void ldap_mark_select_read( LDAP *ld, Sockbuf *sb );
void ldap_mark_select_clear( LDAP *ld, Sockbuf *sb );
int ldap_is_read_ready( LDAP *ld, Sockbuf *sb );
int ldap_is_write_ready( LDAP *ld, Sockbuf *sb );
LIBLDAP_F (void) ldap_int_ip_init( void );
LIBLDAP_F (int) do_ldap_select( LDAP *ld, struct timeval *timeout );
LIBLDAP_F (void *) ldap_new_select_info( void );
LIBLDAP_F (void) ldap_free_select_info( void *sip );
LIBLDAP_F (void) ldap_mark_select_write( LDAP *ld, Sockbuf *sb );
LIBLDAP_F (void) ldap_mark_select_read( LDAP *ld, Sockbuf *sb );
LIBLDAP_F (void) ldap_mark_select_clear( LDAP *ld, Sockbuf *sb );
LIBLDAP_F (int) ldap_is_read_ready( LDAP *ld, Sockbuf *sb );
LIBLDAP_F (int) ldap_is_write_ready( LDAP *ld, Sockbuf *sb );
/*
* in request.c
*/
ber_int_t ldap_send_initial_request( LDAP *ld, ber_tag_t msgtype,
LIBLDAP_F (ber_int_t) ldap_send_initial_request( LDAP *ld, ber_tag_t msgtype,
const char *dn, BerElement *ber );
BerElement *ldap_alloc_ber_with_options( LDAP *ld );
void ldap_set_ber_options( LDAP *ld, BerElement *ber );
LIBLDAP_F (BerElement *) ldap_alloc_ber_with_options( LDAP *ld );
LIBLDAP_F (void) ldap_set_ber_options( LDAP *ld, BerElement *ber );
int ldap_send_server_request( LDAP *ld, BerElement *ber, ber_int_t msgid,
LDAPRequest *parentreq, LDAPServer *srvlist, LDAPConn *lc,
int bind );
LDAPConn *ldap_new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb,
int connect, int bind );
LDAPRequest *ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid );
void ldap_free_request( LDAP *ld, LDAPRequest *lr );
void ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind );
void ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all );
void ldap_dump_requests_and_responses( LDAP *ld );
LIBLDAP_F (int) ldap_send_server_request( LDAP *ld, BerElement *ber, ber_int_t msgid, LDAPRequest *parentreq, LDAPServer *srvlist, LDAPConn *lc, int bind );
LIBLDAP_F (LDAPConn *) ldap_new_connection( LDAP *ld, LDAPServer **srvlistp, int use_ldsb, int connect, int bind );
LIBLDAP_F (LDAPRequest *) ldap_find_request_by_msgid( LDAP *ld, ber_int_t msgid );
LIBLDAP_F (void) ldap_free_request( LDAP *ld, LDAPRequest *lr );
LIBLDAP_F (void) ldap_free_connection( LDAP *ld, LDAPConn *lc, int force, int unbind );
LIBLDAP_F (void) ldap_dump_connection( LDAP *ld, LDAPConn *lconns, int all );
LIBLDAP_F (void) ldap_dump_requests_and_responses( LDAP *ld );
int ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp );
int ldap_append_referral( LDAP *ld, char **referralsp, char *s );
LIBLDAP_F (int) ldap_chase_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp, int *hadrefp );
LIBLDAP_F (int) ldap_append_referral( LDAP *ld, char **referralsp, char *s );
/*
* in result.c:
*/
#ifdef LDAP_CONNECTIONLESS
int cldap_getmsg( LDAP *ld, struct timeval *timeout, BerElement *ber );
LIBLDAP_F (int) cldap_getmsg( LDAP *ld, struct timeval *timeout, BerElement *ber );
#endif
/*
* in search.c
*/
BerElement *ldap_build_search_req LDAP_P((
LIBLDAP_F (BerElement *) ldap_build_search_req LDAP_P((
LDAP *ld,
const char *base,
ber_int_t scope,
@ -433,13 +427,13 @@ BerElement *ldap_build_search_req LDAP_P((
/*
* in unbind.c
*/
int ldap_ld_free LDAP_P((
LIBLDAP_F (int) ldap_ld_free LDAP_P((
LDAP *ld,
int close,
LDAPControl **sctrls,
LDAPControl **cctrls ));
int ldap_send_unbind LDAP_P((
LIBLDAP_F (int) ldap_send_unbind LDAP_P((
LDAP *ld,
Sockbuf *sb,
LDAPControl **sctrls,
@ -449,7 +443,7 @@ int ldap_send_unbind LDAP_P((
/*
* in getdxbyname.c
*/
char **ldap_getdxbyname( const char *domain );
LIBLDAP_F (char **) ldap_getdxbyname( const char *domain );
#endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */
#if defined( STR_TRANSLATION ) && defined( LDAP_DEFAULT_CHARSET )
@ -461,10 +455,8 @@ char **ldap_getdxbyname( const char *domain );
* hodges@stanford.edu 5-Feb-96
*/
#if LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET
extern
int ldap_t61_to_8859( char **bufp, ber_len_t *buflenp, int free_input );
extern
int ldap_8859_to_t61( char **bufp, ber_len_t *buflenp, int free_input );
LIBLDAP_F (int) ldap_t61_to_8859( char **bufp, ber_len_t *buflenp, int free_input );
LIBLDAP_F (int) ldap_8859_to_t61( char **bufp, ber_len_t *buflenp, int free_input );
#endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */
#endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */

View file

@ -42,7 +42,7 @@ XXXLIBS = $(LTHREAD_LIBS)
LINKAGE = @LT_LIB_LINKAGE@
NT_DYN_LIB_LIBS = -llber $(AC_LIBS)
NT_DYN_LIB_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllexport
NT_DYN_LIB_DEFS = -DLIBLBER_DECL=dllimport
NT_DYN_TEST_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
# Extras for building the library

View file

@ -11,8 +11,12 @@ OBJS = ldbm.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
NT_DYN_LIB_DEFS = -DLIBLDAP_DECL=dllimport
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
XLIBS = -lldbm -lavl
XXLIBS = $(LDBM_LIBS)
testldbm: libldbm.a testldbm.o
$(CC) $(LDFLAGS) -o $@ testldbm.o $(LIBS)

View file

@ -10,3 +10,6 @@ OBJS = line64.o fetch.o
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
NT_DYN_LIB_DEFS = -DLIBLDAP_DECL=dllimport -DLIBLBER_DECL=dllimport
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)

View file

@ -22,6 +22,9 @@ OBJS = base64.o debug.o entropy.o \
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
NT_DYN_LIB_DEFS = -DLIBLDAP_DECL=dllimport
CPPFLAGS = $(@PLAT@_@LIB_LINKAGE@_LIB_DEFS)
# These rules are for a Mingw32 build, specifically.
# 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.

View file

@ -47,11 +47,7 @@ BUILD_SRV = @BUILD_SLAPD@
all-local-srv: all-cffiles
NT_GEN_DEFS = -DLIBLUTIL_DECL=dllexport -DLIBAVL_DECL=dllexport \
-DLIBLDBM_DECL=dllexport -DLIBLDIF_DECL=dllexport
NT_DYN_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport $(NT_GEN_DEFS)
NT_STAT_DEFS = -DLIBLBER_DECL=dllexport -DLIBLDAP_DECL=dllexport $(NT_GEN_DEFS)
NT_DYN_DEFS = -DLIBLBER_DECL=dllimport -DLIBLDAP_DECL=dllimport
DEFINES = $(@PLAT@_@LIB_LINKAGE@_DEFS)

View file

@ -28,8 +28,8 @@ static RETSIGTYPE wait4child( int sig );
struct sockaddr_in bind_addr;
/* in nt_main.c */
extern SERVICE_STATUS SLAPDServiceStatus;
extern SERVICE_STATUS_HANDLE hSLAPDServiceStatus;
LIBLUTIL_F (SERVICE_STATUS) SLAPDServiceStatus;
LIBLUTIL_F (SERVICE_STATUS_HANDLE) hSLAPDServiceStatus;
extern ldap_pvt_thread_cond_t started_event, stopped_event;
extern int is_NT_Service;

View file

@ -14,12 +14,12 @@ struct module_regtable_t {
char *type;
int (*proc)(const void *module, const char *file_name);
} module_regtable[] = {
{ "null", load_null },
{ "null", load_null },
#ifdef SLAPD_EXTERNAL_EXTENSIONS
{ "extension", load_extension },
{ "extension", load_extension },
#endif
{ NULL, NULL }
};
{ NULL, NULL }
};
typedef struct module_loaded_t {
struct module_loaded_t *next;

View file

@ -1,11 +1,13 @@
/* $OpenLDAP$ */
#include "portable.h"
#include <ldap.h>
#include <stdio.h>
#include <ac/string.h>
#include "slap.h"
static void stubs()
{
ldap_abandon(NULL, 0);
ldap_add_s(NULL, NULL, NULL);
ldap_bind_s(NULL, NULL, NULL, 0);
ldap_delete_s(NULL, NULL);
@ -26,11 +28,6 @@ static void stubs()
#ifdef HAVE_NT_SERVICE_MANAGER
#include <stdio.h>
#include <ac/string.h>
#include "slap.h"
ldap_pvt_thread_cond_t started_event, stopped_event;
ldap_pvt_thread_t start_status_tid, stop_status_tid;

View file

@ -14,100 +14,99 @@ LDAP_BEGIN_DECL
* acl.c
*/
int access_allowed LDAP_P(( Backend *be, Connection *conn,
LIBSLAPD_F (int) access_allowed LDAP_P(( Backend *be, Connection *conn,
Operation *op, Entry *e,
char *attr, struct berval *val, slap_access_t access ));
int acl_check_modlist LDAP_P(( Backend *be,
LIBSLAPD_F (int) acl_check_modlist LDAP_P(( Backend *be,
Connection *conn,
Operation *op,
Entry *e,
LDAPModList *ml ));
void acl_append( AccessControl **l, AccessControl *a );
LIBSLAPD_F (void) acl_append( AccessControl **l, AccessControl *a );
char *get_supported_acimech LDAP_P((int index));
LIBSLAPD_F (char *) get_supported_acimech LDAP_P((int index));
/*
* aclparse.c
*/
void parse_acl LDAP_P(( Backend *be,
LIBSLAPD_F (void) parse_acl LDAP_P(( Backend *be,
const char *fname,
int lineno,
int argc, char **argv ));
char * access2str LDAP_P(( slap_access_t access ));
slap_access_t str2access LDAP_P(( const char *str ));
LIBSLAPD_F (char *) access2str LDAP_P(( slap_access_t access ));
LIBSLAPD_F (slap_access_t) str2access LDAP_P(( const char *str ));
#define ACCESSMASK_MAXLEN sizeof("unknown (+wrscan)")
char * accessmask2str LDAP_P(( slap_access_mask_t mask, char* ));
slap_access_mask_t str2accessmask LDAP_P(( const char *str ));
LIBSLAPD_F (char *) accessmask2str LDAP_P(( slap_access_mask_t mask, char* ));
LIBSLAPD_F (slap_access_mask_t) str2accessmask LDAP_P(( const char *str ));
/*
* attr.c
*/
void attr_free LDAP_P(( Attribute *a ));
Attribute *attr_dup LDAP_P(( Attribute *a ));
char * attr_normalize LDAP_P(( char *s ));
int attr_merge_fast LDAP_P(( Entry *e, char *type, struct berval **vals, int nvals,
int naddvals, int *maxvals, Attribute ***a ));
int attr_merge LDAP_P(( Entry *e, char *type, struct berval **vals ));
Attribute * attr_find LDAP_P(( Attribute *a, const char *type ));
int attr_delete LDAP_P(( Attribute **attrs, const char *type ));
int attr_syntax LDAP_P(( char *type ));
void attr_syntax_config LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
AttributeType * at_find LDAP_P(( const char *name ));
int at_find_in_list LDAP_P(( AttributeType *sat, AttributeType **list ));
int at_append_to_list LDAP_P(( AttributeType *sat, AttributeType ***listp ));
int at_delete_from_list LDAP_P(( int pos, AttributeType ***listp ));
int at_fake_if_needed LDAP_P(( char *name ));
int at_schema_info LDAP_P(( Entry *e ));
int at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, const char **err ));
char * at_canonical_name LDAP_P(( char * a_type ));
LIBSLAPD_F (void) attr_free LDAP_P(( Attribute *a ));
LIBSLAPD_F (Attribute *) attr_dup LDAP_P(( Attribute *a ));
LIBSLAPD_F (char *) attr_normalize LDAP_P(( char *s ));
LIBSLAPD_F (int) attr_merge_fast LDAP_P(( Entry *e, char *type, struct berval **vals, int nvals, int naddvals, int *maxvals, Attribute ***a ));
LIBSLAPD_F (int) attr_merge LDAP_P(( Entry *e, char *type, struct berval **vals ));
LIBSLAPD_F (Attribute *) attr_find LDAP_P(( Attribute *a, const char *type ));
LIBSLAPD_F (int) attr_delete LDAP_P(( Attribute **attrs, const char *type ));
LIBSLAPD_F (int) attr_syntax LDAP_P(( char *type ));
LIBSLAPD_F (void) attr_syntax_config LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
LIBSLAPD_F (AttributeType *) at_find LDAP_P(( const char *name ));
LIBSLAPD_F (int) at_find_in_list LDAP_P(( AttributeType *sat, AttributeType **list ));
LIBSLAPD_F (int) at_append_to_list LDAP_P(( AttributeType *sat, AttributeType ***listp ));
LIBSLAPD_F (int) at_delete_from_list LDAP_P(( int pos, AttributeType ***listp ));
LIBSLAPD_F (int) at_fake_if_needed LDAP_P(( char *name ));
LIBSLAPD_F (int) at_schema_info LDAP_P(( Entry *e ));
LIBSLAPD_F (int) at_add LDAP_P(( LDAP_ATTRIBUTE_TYPE *at, const char **err ));
LIBSLAPD_F (char *) at_canonical_name LDAP_P(( char * a_type ));
void attrs_free LDAP_P(( Attribute *a ));
Attribute *attrs_dup LDAP_P(( Attribute *a ));
LIBSLAPD_F (void) attrs_free LDAP_P(( Attribute *a ));
LIBSLAPD_F (Attribute *) attrs_dup LDAP_P(( Attribute *a ));
/*
* ava.c
*/
int get_ava LDAP_P(( BerElement *ber, Ava *ava ));
void ava_free LDAP_P(( Ava *ava, int freeit ));
LIBSLAPD_F (int) get_ava LDAP_P(( BerElement *ber, Ava *ava ));
LIBSLAPD_F (void) ava_free LDAP_P(( Ava *ava, int freeit ));
/*
* backend.c
*/
int backend_init LDAP_P((void));
int backend_add LDAP_P((BackendInfo *aBackendInfo));
int backend_num LDAP_P((Backend *be));
int backend_startup LDAP_P((Backend *be));
int backend_shutdown LDAP_P((Backend *be));
int backend_destroy LDAP_P((void));
LIBSLAPD_F (int) backend_init LDAP_P((void));
LIBSLAPD_F (int) backend_add LDAP_P((BackendInfo *aBackendInfo));
LIBSLAPD_F (int) backend_num LDAP_P((Backend *be));
LIBSLAPD_F (int) backend_startup LDAP_P((Backend *be));
LIBSLAPD_F (int) backend_shutdown LDAP_P((Backend *be));
LIBSLAPD_F (int) backend_destroy LDAP_P((void));
BackendInfo * backend_info LDAP_P(( const char *type ));
BackendDB * backend_db_init LDAP_P(( const char *type ));
LIBSLAPD_F (BackendInfo *) backend_info LDAP_P(( const char *type ));
LIBSLAPD_F (BackendDB *) backend_db_init LDAP_P(( const char *type ));
BackendDB * select_backend LDAP_P(( const char * dn ));
LIBSLAPD_F (BackendDB *) select_backend LDAP_P(( const char * dn ));
int be_issuffix LDAP_P(( Backend *be, const char *suffix ));
int be_isroot LDAP_P(( Backend *be, const char *ndn ));
int be_isroot_pw LDAP_P(( Backend *be, const char *ndn, struct berval *cred ));
char* be_root_dn LDAP_P(( Backend *be ));
int be_entry_release_rw LDAP_P(( Backend *be, Entry *e, int rw ));
LIBSLAPD_F (int) be_issuffix LDAP_P(( Backend *be, const char *suffix ));
LIBSLAPD_F (int) be_isroot LDAP_P(( Backend *be, const char *ndn ));
LIBSLAPD_F (int) be_isroot_pw LDAP_P(( Backend *be, const char *ndn, struct berval *cred ));
LIBSLAPD_F (char *) be_root_dn LDAP_P(( Backend *be ));
LIBSLAPD_F (int) be_entry_release_rw LDAP_P(( Backend *be, Entry *e, int rw ));
#define be_entry_release_r( be, e ) be_entry_release_rw( be, e, 0 )
#define be_entry_release_w( be, e ) be_entry_release_rw( be, e, 1 )
extern int backend_unbind LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) backend_unbind LDAP_P((Connection *conn, Operation *op));
extern int backend_connection_init LDAP_P((Connection *conn));
extern int backend_connection_destroy LDAP_P((Connection *conn));
LIBSLAPD_F (int) backend_connection_init LDAP_P((Connection *conn));
LIBSLAPD_F (int) backend_connection_destroy LDAP_P((Connection *conn));
extern int backend_group LDAP_P((Backend *be,
LIBSLAPD_F (int) backend_group LDAP_P((Backend *be,
Entry *target,
const char *gr_ndn,
const char *op_ndn,
@ -116,7 +115,7 @@ extern int backend_group LDAP_P((Backend *be,
#ifdef SLAPD_SCHEMA_DN
/* temporary extern for temporary routine*/
extern Attribute *backend_subschemasubentry( Backend * );
LIBSLAPD_F (Attribute *) backend_subschemasubentry( Backend * );
#endif
@ -132,11 +131,11 @@ extern Attribute *backend_subschemasubentry( Backend * );
#define ch_free free
#else
void * ch_malloc LDAP_P(( ber_len_t size ));
void * ch_realloc LDAP_P(( void *block, ber_len_t size ));
void * ch_calloc LDAP_P(( ber_len_t nelem, ber_len_t size ));
char * ch_strdup LDAP_P(( const char *string ));
void ch_free LDAP_P(( void * ));
LIBSLAPD_F (void *) ch_malloc LDAP_P(( ber_len_t size ));
LIBSLAPD_F (void *) ch_realloc LDAP_P(( void *block, ber_len_t size ));
LIBSLAPD_F (void *) ch_calloc LDAP_P(( ber_len_t nelem, ber_len_t size ));
LIBSLAPD_F (char *) ch_strdup LDAP_P(( const char *string ));
LIBSLAPD_F (void) ch_free LDAP_P(( void * ));
#ifndef CH_FREE
#undef free
@ -148,39 +147,39 @@ void ch_free LDAP_P(( void * ));
* charray.c
*/
void charray_add LDAP_P(( char ***a, const char *s ));
void charray_merge LDAP_P(( char ***a, char **s ));
void charray_free LDAP_P(( char **array ));
int charray_inlist LDAP_P(( char **a, const char *s ));
char ** charray_dup LDAP_P(( char **a ));
char ** str2charray LDAP_P(( const char *str, const char *brkstr ));
char * charray2str LDAP_P(( char **a ));
LIBSLAPD_F (void) charray_add LDAP_P(( char ***a, const char *s ));
LIBSLAPD_F (void) charray_merge LDAP_P(( char ***a, char **s ));
LIBSLAPD_F (void) charray_free LDAP_P(( char **array ));
LIBSLAPD_F (int) charray_inlist LDAP_P(( char **a, const char *s ));
LIBSLAPD_F (char **) charray_dup LDAP_P(( char **a ));
LIBSLAPD_F (char **) str2charray LDAP_P(( const char *str, const char *brkstr ));
LIBSLAPD_F (char *) charray2str LDAP_P(( char **a ));
/*
* controls.c
*/
int get_ctrls LDAP_P((
LIBSLAPD_F (int) get_ctrls LDAP_P((
Connection *co,
Operation *op,
int senderrors ));
int get_manageDSAit LDAP_P(( Operation *op ));
LIBSLAPD_F (int) get_manageDSAit LDAP_P(( Operation *op ));
/*
* config.c
*/
int read_config LDAP_P(( const char *fname ));
LIBSLAPD_F (int) read_config LDAP_P(( const char *fname ));
/*
* connection.c
*/
int connections_init LDAP_P((void));
int connections_shutdown LDAP_P((void));
int connections_destroy LDAP_P((void));
int connections_timeout_idle LDAP_P((time_t));
LIBSLAPD_F (int) connections_init LDAP_P((void));
LIBSLAPD_F (int) connections_shutdown LDAP_P((void));
LIBSLAPD_F (int) connections_destroy LDAP_P((void));
LIBSLAPD_F (int) connections_timeout_idle LDAP_P((time_t));
long connection_init LDAP_P((
LIBSLAPD_F (long) connection_init LDAP_P((
ber_socket_t s,
const char* url,
const char* dnsname,
@ -188,37 +187,37 @@ long connection_init LDAP_P((
const char* sockname,
int use_tls ));
void connection_closing LDAP_P(( Connection *c ));
int connection_state_closing LDAP_P(( Connection *c ));
const char *connection_state2str LDAP_P(( int state )) LDAP_GCCATTR((const));
LIBSLAPD_F (void) connection_closing LDAP_P(( Connection *c ));
LIBSLAPD_F (int) connection_state_closing LDAP_P(( Connection *c ));
LIBSLAPD_F (const char *) connection_state2str LDAP_P(( int state )) LDAP_GCCATTR((const));
int connection_write LDAP_P((ber_socket_t s));
int connection_read LDAP_P((ber_socket_t s));
LIBSLAPD_F (int) connection_write LDAP_P((ber_socket_t s));
LIBSLAPD_F (int) connection_read LDAP_P((ber_socket_t s));
unsigned long connections_nextid(void);
LIBSLAPD_F (unsigned long) connections_nextid(void);
Connection* connection_first LDAP_P((ber_socket_t *));
Connection* connection_next LDAP_P((Connection *, ber_socket_t *));
void connection_done LDAP_P((Connection *));
LIBSLAPD_F (Connection *) connection_first LDAP_P((ber_socket_t *));
LIBSLAPD_F (Connection *) connection_next LDAP_P((Connection *, ber_socket_t *));
LIBSLAPD_F (void) connection_done LDAP_P((Connection *));
/*
* dn.c
*/
char * dn_validate LDAP_P(( char *dn ));
char * dn_normalize LDAP_P(( char *dn ));
char * dn_parent LDAP_P(( Backend *be, const char *dn ));
char ** dn_subtree LDAP_P(( Backend *be, const char *dn ));
char * dn_rdn LDAP_P(( Backend *be, char *dn ));
int dn_issuffix LDAP_P(( char *dn, char *suffix ));
LIBSLAPD_F (char *) dn_validate LDAP_P(( char *dn ));
LIBSLAPD_F (char *) dn_normalize LDAP_P(( char *dn ));
LIBSLAPD_F (char *) dn_parent LDAP_P(( Backend *be, const char *dn ));
LIBSLAPD_F (char **) dn_subtree LDAP_P(( Backend *be, const char *dn ));
LIBSLAPD_F (char *) dn_rdn LDAP_P(( Backend *be, char *dn ));
LIBSLAPD_F (int) dn_issuffix LDAP_P(( char *dn, char *suffix ));
#ifdef DNS_DN
int dn_type LDAP_P(( char *dn ));
LIBSLAPD_F (int) dn_type LDAP_P(( char *dn ));
#endif
int rdn_validate LDAP_P(( const char* str ));
char * rdn_attr_value LDAP_P(( char * rdn ));
char * rdn_attr_type LDAP_P(( char * rdn ));
LIBSLAPD_F (int) rdn_validate LDAP_P(( const char* str ));
LIBSLAPD_F (char *) rdn_attr_value LDAP_P(( char * rdn ));
LIBSLAPD_F (char *) rdn_attr_type LDAP_P(( char * rdn ));
void build_new_dn LDAP_P(( char ** new_dn,
LIBSLAPD_F (void) build_new_dn LDAP_P(( char ** new_dn,
const char *e_dn,
const char * p_dn,
const char * newrdn ));
@ -226,65 +225,64 @@ void build_new_dn LDAP_P(( char ** new_dn,
* entry.c
*/
int entry_destroy LDAP_P((void));
LIBSLAPD_F (int) entry_destroy LDAP_P((void));
Entry * str2entry LDAP_P(( char *s ));
char * entry2str LDAP_P(( Entry *e, int *len ));
void entry_free LDAP_P(( Entry *e ));
LIBSLAPD_F (Entry *) str2entry LDAP_P(( char *s ));
LIBSLAPD_F (char *) entry2str LDAP_P(( Entry *e, int *len ));
LIBSLAPD_F (void) entry_free LDAP_P(( Entry *e ));
int entry_cmp LDAP_P(( Entry *a, Entry *b ));
int entry_dn_cmp LDAP_P(( Entry *a, Entry *b ));
int entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
LIBSLAPD_F (int) entry_cmp LDAP_P(( Entry *a, Entry *b ));
LIBSLAPD_F (int) entry_dn_cmp LDAP_P(( Entry *a, Entry *b ));
LIBSLAPD_F (int) entry_id_cmp LDAP_P(( Entry *a, Entry *b ));
/*
* extended.c
*/
int load_extension LDAP_P((const void *module, const char *file_name));
char *get_supported_extension LDAP_P((int index));
LIBSLAPD_F (int) load_extension LDAP_P((const void *module, const char *file_name));
LIBSLAPD_F (char *) get_supported_extension LDAP_P((int index));
/*
* filter.c
*/
int get_filter LDAP_P(( Connection *conn, BerElement *ber, Filter **filt, char **fstr ));
void filter_free LDAP_P(( Filter *f ));
void filter_print LDAP_P(( Filter *f ));
LIBSLAPD_F (int) get_filter LDAP_P(( Connection *conn, BerElement *ber, Filter **filt, char **fstr ));
LIBSLAPD_F (void) filter_free LDAP_P(( Filter *f ));
LIBSLAPD_F (void) filter_print LDAP_P(( Filter *f ));
/*
* filterentry.c
*/
int test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e,
Filter *f ));
LIBSLAPD_F (int) test_filter LDAP_P(( Backend *be, Connection *conn, Operation *op, Entry *e, Filter *f ));
/*
* lock.c
*/
FILE * lock_fopen LDAP_P(( const char *fname, const char *type, FILE **lfp ));
int lock_fclose LDAP_P(( FILE *fp, FILE *lfp ));
LIBSLAPD_F (FILE *) lock_fopen LDAP_P(( const char *fname, const char *type, FILE **lfp ));
LIBSLAPD_F (int) lock_fclose LDAP_P(( FILE *fp, FILE *lfp ));
/*
* module.c
*/
#ifdef SLAPD_MODULES
int module_init LDAP_P(( void ));
int module_kill LDAP_P(( void ));
LIBSLAPD_F (int) module_init LDAP_P(( void ));
LIBSLAPD_F (int) module_kill LDAP_P(( void ));
int module_load LDAP_P(( const char* file_name, int argc, char *argv[] ));
int module_path LDAP_P(( const char* path ));
LIBSLAPD_F (int) module_load LDAP_P(( const char* file_name, int argc, char *argv[] ));
LIBSLAPD_F (int) module_path LDAP_P(( const char* path ));
void *module_resolve LDAP_P((const void *module, const char *name));
LIBSLAPD_F (void) *module_resolve LDAP_P((const void *module, const char *name));
#endif /* SLAPD_MODULES */
/*
* monitor.c
*/
extern char *supportedControls[];
LIBSLAPD_F (char *) supportedControls[];
void monitor_info LDAP_P((
LIBSLAPD_F (void) monitor_info LDAP_P((
Connection *conn,
Operation *op,
char ** attrs,
@ -294,105 +292,105 @@ void monitor_info LDAP_P((
* operation.c
*/
void slap_op_free LDAP_P(( Operation *op ));
Operation * slap_op_alloc LDAP_P((
LIBSLAPD_F (void) slap_op_free LDAP_P(( Operation *op ));
LIBSLAPD_F (Operation *) slap_op_alloc LDAP_P((
BerElement *ber, ber_int_t msgid,
ber_tag_t tag, ber_int_t id ));
int slap_op_add LDAP_P(( Operation **olist, Operation *op ));
int slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
Operation * slap_op_pop LDAP_P(( Operation **olist ));
LIBSLAPD_F (int) slap_op_add LDAP_P(( Operation **olist, Operation *op ));
LIBSLAPD_F (int) slap_op_remove LDAP_P(( Operation **olist, Operation *op ));
LIBSLAPD_F (Operation *) slap_op_pop LDAP_P(( Operation **olist ));
/*
* phonetic.c
*/
char * first_word LDAP_P(( char *s ));
char * next_word LDAP_P(( char *s ));
char * word_dup LDAP_P(( char *w ));
char * phonetic LDAP_P(( char *s ));
LIBSLAPD_F (char *) first_word LDAP_P(( char *s ));
LIBSLAPD_F (char *) next_word LDAP_P(( char *s ));
LIBSLAPD_F (char *) word_dup LDAP_P(( char *w ));
LIBSLAPD_F (char *) phonetic LDAP_P(( char *s ));
/*
* repl.c
*/
void replog LDAP_P(( Backend *be, Operation *op, char *dn, void *change ));
LIBSLAPD_F (void) replog LDAP_P(( Backend *be, Operation *op, char *dn, void *change ));
/*
* result.c
*/
struct berval **get_entry_referrals LDAP_P((
LIBSLAPD_F (struct berval **) get_entry_referrals LDAP_P((
Backend *be, Connection *conn, Operation *op,
Entry *e ));
void send_ldap_result LDAP_P((
LIBSLAPD_F (void) send_ldap_result LDAP_P((
Connection *conn, Operation *op,
ber_int_t err, const char *matched, const char *text,
struct berval **refs,
LDAPControl **ctrls ));
void send_ldap_disconnect LDAP_P((
LIBSLAPD_F (void) send_ldap_disconnect LDAP_P((
Connection *conn, Operation *op,
ber_int_t err, const char *text ));
void send_ldap_extended LDAP_P((
LIBSLAPD_F (void) send_ldap_extended LDAP_P((
Connection *conn, Operation *op,
ber_int_t err, const char *matched,
const char *text, char *rspoid,
struct berval *rspdata ));
void send_search_result LDAP_P((
LIBSLAPD_F (void) send_search_result LDAP_P((
Connection *conn, Operation *op,
ber_int_t err, const char *matched, const char *text,
struct berval **refs,
LDAPControl **ctrls,
int nentries ));
int send_search_reference LDAP_P((
LIBSLAPD_F (int) send_search_reference LDAP_P((
Backend *be, Connection *conn, Operation *op,
Entry *e, struct berval **refs, int scope,
LDAPControl **ctrls,
struct berval ***v2refs ));
int send_search_entry LDAP_P((
LIBSLAPD_F (int) send_search_entry LDAP_P((
Backend *be, Connection *conn, Operation *op,
Entry *e, char **attrs, int attrsonly,
LDAPControl **ctrls ));
int str2result LDAP_P(( char *s,
LIBSLAPD_F (int) str2result LDAP_P(( char *s,
int *code, char **matched, char **info ));
/*
* sasl.c
*/
extern char **supportedSASLMechanisms;
LIBSLAPD_F (char **) supportedSASLMechanisms;
int sasl_init(void);
int sasl_destroy(void);
LIBSLAPD_F (int) sasl_init(void);
LIBSLAPD_F (int) sasl_destroy(void);
/*
* schema.c
*/
int oc_schema_check LDAP_P(( Entry *e ));
int oc_check_operational_attr LDAP_P(( const char *type ));
int oc_check_usermod_attr LDAP_P(( const char *type ));
int oc_check_no_usermod_attr LDAP_P(( const char *type ));
ObjectClass *oc_find LDAP_P((const char *ocname));
int oc_add LDAP_P((LDAP_OBJECT_CLASS *oc, const char **err));
Syntax *syn_find LDAP_P((const char *synname));
Syntax *syn_find_desc LDAP_P((const char *syndesc, int *slen));
int syn_add LDAP_P((LDAP_SYNTAX *syn, slap_syntax_check_func *check, const char **err));
MatchingRule *mr_find LDAP_P((const char *mrname));
int mr_add LDAP_P((LDAP_MATCHING_RULE *mr, slap_mr_normalize_func *normalize, slap_mr_compare_func *compare, const char **err));
int case_ignore_normalize LDAP_P((struct berval *val, struct berval **normalized));
int register_syntax LDAP_P((char *desc, slap_syntax_check_func *check ));
int register_matching_rule LDAP_P((char * desc, slap_mr_normalize_func *normalize, slap_mr_compare_func *compare));
void schema_info LDAP_P((Connection *conn, Operation *op, char **attrs, int attrsonly));
int schema_init LDAP_P((void));
LIBSLAPD_F (int) oc_schema_check LDAP_P(( Entry *e ));
LIBSLAPD_F (int) oc_check_operational_attr LDAP_P(( const char *type ));
LIBSLAPD_F (int) oc_check_usermod_attr LDAP_P(( const char *type ));
LIBSLAPD_F (int) oc_check_no_usermod_attr LDAP_P(( const char *type ));
LIBSLAPD_F (ObjectClass *) oc_find LDAP_P((const char *ocname));
LIBSLAPD_F (int) oc_add LDAP_P((LDAP_OBJECT_CLASS *oc, const char **err));
LIBSLAPD_F (Syntax *) syn_find LDAP_P((const char *synname));
LIBSLAPD_F (Syntax *) syn_find_desc LDAP_P((const char *syndesc, int *slen));
LIBSLAPD_F (int) syn_add LDAP_P((LDAP_SYNTAX *syn, slap_syntax_check_func *check, const char **err));
LIBSLAPD_F (MatchingRule *) mr_find LDAP_P((const char *mrname));
LIBSLAPD_F (int) mr_add LDAP_P((LDAP_MATCHING_RULE *mr, slap_mr_normalize_func *normalize, slap_mr_compare_func *compare, const char **err));
LIBSLAPD_F (int) case_ignore_normalize LDAP_P((struct berval *val, struct berval **normalized));
LIBSLAPD_F (int) register_syntax LDAP_P((char *desc, slap_syntax_check_func *check ));
LIBSLAPD_F (int) register_matching_rule LDAP_P((char * desc, slap_mr_normalize_func *normalize, slap_mr_compare_func *compare));
LIBSLAPD_F (void) schema_info LDAP_P((Connection *conn, Operation *op, char **attrs, int attrsonly));
LIBSLAPD_F (int) schema_init LDAP_P((void));
int is_entry_objectclass LDAP_P(( Entry *, const char* objectclass ));
LIBSLAPD_F (int) is_entry_objectclass LDAP_P(( Entry *, const char* objectclass ));
#define is_entry_alias(e) is_entry_objectclass((e), "ALIAS")
#define is_entry_referral(e) is_entry_objectclass((e), "REFERRAL")
@ -401,47 +399,44 @@ int is_entry_objectclass LDAP_P(( Entry *, const char* objectclass ));
* schemaparse.c
*/
void parse_oc_old LDAP_P(( Backend *be, const char *fname, int lineno, int argc, char **argv ));
void parse_oc LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
void parse_at LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
void parse_oidm LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
char *scherr2str LDAP_P((int code)) LDAP_GCCATTR((const));
int dscompare LDAP_P(( const char *s1, const char *s2del, char delim ));
LIBSLAPD_F (void) parse_oc_old LDAP_P(( Backend *be, const char *fname, int lineno, int argc, char **argv ));
LIBSLAPD_F (void) parse_oc LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
LIBSLAPD_F (void) parse_at LDAP_P(( const char *fname, int lineno, char *line, char **argv ));
LIBSLAPD_F (void) parse_oidm LDAP_P(( const char *fname, int lineno, int argc, char **argv ));
LIBSLAPD_F (char *) scherr2str LDAP_P((int code)) LDAP_GCCATTR((const));
LIBSLAPD_F (int) dscompare LDAP_P(( const char *s1, const char *s2del, char delim ));
/*
* str2filter.c
*/
Filter * str2filter LDAP_P(( char *str ));
LIBSLAPD_F (Filter *) str2filter LDAP_P(( char *str ));
/*
* suffixalias.c
*/
char *suffix_alias LDAP_P(( Backend *be, char *ndn ));
LIBSLAPD_F (char *) suffix_alias LDAP_P(( Backend *be, char *ndn ));
/*
* value.c
*/
int value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals,
int naddvals, int *maxvals ));
int value_add LDAP_P(( struct berval ***vals, struct berval **addvals ));
void value_normalize LDAP_P(( char *s, int syntax ));
int value_cmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax,
int normalize ));
int value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax,
int normalize ));
LIBSLAPD_F (int) value_add_fast LDAP_P(( struct berval ***vals, struct berval **addvals, int nvals, int naddvals, int *maxvals ));
LIBSLAPD_F (int) value_add LDAP_P(( struct berval ***vals, struct berval **addvals ));
LIBSLAPD_F (void) value_normalize LDAP_P(( char *s, int syntax ));
LIBSLAPD_F (int) value_cmp LDAP_P(( struct berval *v1, struct berval *v2, int syntax, int normalize ));
LIBSLAPD_F (int) value_find LDAP_P(( struct berval **vals, struct berval *v, int syntax, int normalize ));
/*
* user.c
*/
#if defined(HAVE_PWD_H) && defined(HAVE_GRP_H)
void slap_init_user LDAP_P(( char *username, char *groupname ));
LIBSLAPD_F (void) slap_init_user LDAP_P(( char *username, char *groupname ));
#endif
/*
* passwd.c
*/
int slap_passwd_check(
LIBSLAPD_F (int) slap_passwd_check(
struct berval **vals,
struct berval *v,
int syntax,
@ -452,105 +447,105 @@ int slap_passwd_check(
* kerberos.c
*/
#ifdef HAVE_KERBEROS
extern int krbv4_ldap_auth();
LIBSLAPD_F (int) krbv4_ldap_auth();
#endif
/*
* Other...
*/
extern struct berval **default_referral;
extern char *replogfile;
extern const char Versionstr[];
extern int active_threads;
extern int defsize;
extern int deftime;
extern int g_argc;
extern slap_access_t global_default_access;
extern int global_readonly;
extern int global_lastmod;
extern int global_idletimeout;
extern int global_schemacheck;
extern char *global_realm;
extern int lber_debug;
extern int ldap_syslog;
LIBSLAPD_F (struct berval **) default_referral;
LIBSLAPD_F (char *) replogfile;
LIBSLAPD_F (const char) Versionstr[];
LIBSLAPD_F (int) active_threads;
LIBSLAPD_F (int) defsize;
LIBSLAPD_F (int) deftime;
LIBSLAPD_F (int) g_argc;
LIBSLAPD_F (slap_access_t) global_default_access;
LIBSLAPD_F (int) global_readonly;
LIBSLAPD_F (int) global_lastmod;
LIBSLAPD_F (int) global_idletimeout;
LIBSLAPD_F (int) global_schemacheck;
LIBSLAPD_F (char) *global_realm;
LIBSLAPD_F (int) lber_debug;
LIBSLAPD_F (int) ldap_syslog;
extern ldap_pvt_thread_mutex_t num_sent_mutex;
extern long num_bytes_sent;
extern long num_pdu_sent;
extern long num_entries_sent;
extern long num_refs_sent;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) num_sent_mutex;
LIBSLAPD_F (long) num_bytes_sent;
LIBSLAPD_F (long) num_pdu_sent;
LIBSLAPD_F (long) num_entries_sent;
LIBSLAPD_F (long) num_refs_sent;
extern ldap_pvt_thread_mutex_t num_ops_mutex;
extern long num_ops_completed;
extern long num_ops_initiated;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) num_ops_mutex;
LIBSLAPD_F (long) num_ops_completed;
LIBSLAPD_F (long) num_ops_initiated;
extern char *slapd_pid_file;
extern char *slapd_args_file;
extern char **g_argv;
extern time_t starttime;
LIBSLAPD_F (char *) slapd_pid_file;
LIBSLAPD_F (char *) slapd_args_file;
LIBSLAPD_F (char) **g_argv;
LIBSLAPD_F (time_t) starttime;
time_t slap_get_time LDAP_P((void));
LIBSLAPD_F (time_t) slap_get_time LDAP_P((void));
extern ldap_pvt_thread_mutex_t active_threads_mutex;
extern ldap_pvt_thread_cond_t active_threads_cond;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) active_threads_mutex;
LIBSLAPD_F (ldap_pvt_thread_cond_t) active_threads_cond;
extern ldap_pvt_thread_mutex_t entry2str_mutex;
extern ldap_pvt_thread_mutex_t replog_mutex;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) entry2str_mutex;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) replog_mutex;
#ifdef SLAPD_CRYPT
extern ldap_pvt_thread_mutex_t crypt_mutex;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) crypt_mutex;
#endif
extern ldap_pvt_thread_mutex_t gmtime_mutex;
LIBSLAPD_F (ldap_pvt_thread_mutex_t) gmtime_mutex;
extern AccessControl *global_acl;
LIBSLAPD_F (AccessControl *) global_acl;
int slap_init LDAP_P((int mode, char* name));
int slap_startup LDAP_P(( Backend *be ));
int slap_shutdown LDAP_P(( Backend *be ));
int slap_destroy LDAP_P((void));
LIBSLAPD_F (int) slap_init LDAP_P((int mode, char* name));
LIBSLAPD_F (int) slap_startup LDAP_P(( Backend *be ));
LIBSLAPD_F (int) slap_shutdown LDAP_P(( Backend *be ));
LIBSLAPD_F (int) slap_destroy LDAP_P((void));
struct sockaddr_in;
extern int slapd_daemon_init( char *urls, int port, int tls_port );
extern int slapd_daemon_destroy(void);
extern int slapd_daemon(void);
LIBSLAPD_F (int) slapd_daemon_init( char *urls, int port, int tls_port );
LIBSLAPD_F (int) slapd_daemon_destroy(void);
LIBSLAPD_F (int) slapd_daemon(void);
extern void slapd_set_write LDAP_P((ber_socket_t s, int wake));
extern void slapd_clr_write LDAP_P((ber_socket_t s, int wake));
extern void slapd_set_read LDAP_P((ber_socket_t s, int wake));
extern void slapd_clr_read LDAP_P((ber_socket_t s, int wake));
LIBSLAPD_F (void) slapd_set_write LDAP_P((ber_socket_t s, int wake));
LIBSLAPD_F (void) slapd_clr_write LDAP_P((ber_socket_t s, int wake));
LIBSLAPD_F (void) slapd_set_read LDAP_P((ber_socket_t s, int wake));
LIBSLAPD_F (void) slapd_clr_read LDAP_P((ber_socket_t s, int wake));
extern void slapd_remove LDAP_P((ber_socket_t s, int wake));
LIBSLAPD_F (void) slapd_remove LDAP_P((ber_socket_t s, int wake));
extern RETSIGTYPE slap_sig_shutdown LDAP_P((int sig));
extern RETSIGTYPE slap_sig_wake LDAP_P((int sig));
LIBSLAPD_F (RETSIGTYPE) slap_sig_shutdown LDAP_P((int sig));
LIBSLAPD_F (RETSIGTYPE) slap_sig_wake LDAP_P((int sig));
extern void config_info LDAP_P((
LIBSLAPD_F (void) config_info LDAP_P((
Connection *conn,
Operation *op,
char ** attrs,
int attrsonly ));
extern void root_dse_info LDAP_P((
LIBSLAPD_F (void) root_dse_info LDAP_P((
Connection *conn,
Operation *op,
char ** attrs,
int attrsonly ));
extern int do_abandon LDAP_P((Connection *conn, Operation *op));
extern int do_add LDAP_P((Connection *conn, Operation *op));
extern int do_bind LDAP_P((Connection *conn, Operation *op));
extern int do_compare LDAP_P((Connection *conn, Operation *op));
extern int do_delete LDAP_P((Connection *conn, Operation *op));
extern int do_modify LDAP_P((Connection *conn, Operation *op));
extern int do_modrdn LDAP_P((Connection *conn, Operation *op));
extern int do_search LDAP_P((Connection *conn, Operation *op));
extern int do_unbind LDAP_P((Connection *conn, Operation *op));
extern int do_extended LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_abandon LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_add LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_bind LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_compare LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_delete LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_modify LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_modrdn LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_search LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_unbind LDAP_P((Connection *conn, Operation *op));
LIBSLAPD_F (int) do_extended LDAP_P((Connection *conn, Operation *op));
extern ber_socket_t dtblsize;
LIBSLAPD_F (ber_socket_t) dtblsize;
LDAP_END_DECL

View file

@ -102,7 +102,7 @@ LDAP_BEGIN_DECL
#define SLAPD_ACI_DEFAULT_ATTR "aci"
extern int slap_debug;
LIBSLAPD_F (int) slap_debug;
struct slap_op;
struct slap_conn;
@ -444,12 +444,12 @@ typedef struct slap_object_class {
typedef struct slap_backend_info BackendInfo; /* per backend type */
typedef struct slap_backend_db BackendDB; /* per backend database */
extern int nBackendInfo;
extern int nBackendDB;
extern BackendInfo *backendInfo;
extern BackendDB *backendDB;
LIBSLAPD_F (int) nBackendInfo;
LIBSLAPD_F (int) nBackendDB;
LIBSLAPD_F (BackendInfo *) backendInfo;
LIBSLAPD_F (BackendDB *) backendDB;
extern int slapMode;
LIBSLAPD_F (int) slapMode;
#define SLAP_UNDEFINED_MODE 0x0000
#define SLAP_SERVER_MODE 0x0001
#define SLAP_TOOL_MODE 0x0002

View file

@ -161,6 +161,7 @@ index_add_mods
index_change_values
index_read
is_entry_objectclass
ldap_abandon
ldap_add_s
ldap_bind_s
ldap_delete_s