From: Kurt Zeilenga Date: Thu, 12 Nov 1998 21:07:28 +0000 (+0000) Subject: Move extern declarations to headers. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~1126 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a9d6d0c6a13f26cab4df22dceb9885f0fd786323;p=openldap Move extern declarations to headers. Update NT portable.h and features.h --- diff --git a/include/ldap_features.h.nt b/include/ldap_features.h.nt index 78ae104517..a4673c2933 100644 --- a/include/ldap_features.h.nt +++ b/include/ldap_features.h.nt @@ -8,7 +8,7 @@ #define LDAP_API_FEATURE_X_OPENLDAP_DEBUG LDAP_API_VENDOR_VERSION /* OpenLDAP v2 DNS */ -#define LDAP_API_FEATURE_X_OPENLDAP_V2_DNS LDAP_API_VENDOR_VERSION +/* #undef LDAP_API_FEATURE_X_OPENLDAP_V2_DNS */ /* OpenLDAP v2 Referrals */ #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_API_VENDOR_VERSION diff --git a/include/portable.h.nt b/include/portable.h.nt index 780aa646d9..ba45d908cd 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -32,6 +32,9 @@ is provided ``as is'' without express or implied warranty. #ifndef _LDAP_PORTABLE_H #define _LDAP_PORTABLE_H +/* MSVC5 doesn't define _STDC_, but requires prototypes */ +#define __NEED_PROTOTYPES 1 + /* we installed Henry Spencer's REGEX */ #define HAVE_REGEX_H 1 diff --git a/libraries/libldap/disptmpl.c b/libraries/libldap/disptmpl.c index a15640846d..54b493e7c7 100644 --- a/libraries/libldap/disptmpl.c +++ b/libraries/libldap/disptmpl.c @@ -33,8 +33,6 @@ static void free_disptmpl LDAP_P(( struct ldap_disptmpl *tmpl )); static int read_next_tmpl LDAP_P(( char **bufp, long *blenp, struct ldap_disptmpl **tmplp, int dtversion )); -int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); -void free_strarray LDAP_P(( char **sap )); static char *tmploptions[] = { "addable", "modrdn", diff --git a/libraries/libldap/dsparse.c b/libraries/libldap/dsparse.c index 3fdd7b9c44..394e61ec34 100644 --- a/libraries/libldap/dsparse.c +++ b/libraries/libldap/dsparse.c @@ -30,8 +30,6 @@ #include "ldap-int.h" -int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); -void free_strarray LDAP_P(( char **sap )); static int next_line LDAP_P(( char **bufp, long *blenp, char **linep )); static char *next_token LDAP_P(( char ** sp )); diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index c8b0d3e8a0..4fe8f855c6 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -79,10 +79,10 @@ ldap_err2string( int err ) return( "Unknown error" ); } -#ifdef LDAP_LIBUI void ldap_perror( LDAP *ld, char *s ) { +#ifdef LDAP_LIBUI int i; Debug( LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0 ); @@ -109,17 +109,8 @@ ldap_perror( LDAP *ld, char *s ) fprintf( stderr, "%s: Not an LDAP errno %d\n", s, ld->ld_errno ); fflush( stderr ); -} - -#else - -void -ldap_perror( LDAP *ld, char *s ) -{ -} - #endif /* !LDAP_LIBUI */ - +} int ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit ) diff --git a/libraries/libldap/getfilter.c b/libraries/libldap/getfilter.c index dc053ed56a..b6272659c4 100644 --- a/libraries/libldap/getfilter.c +++ b/libraries/libldap/getfilter.c @@ -28,8 +28,6 @@ static char copyright[] = "@(#) Copyright (c) 1993 Regents of the University of #include "ldap-int.h" static int break_into_words LDAP_P(( char *str, char *delims, char ***wordsp )); -int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); -void free_strarray LDAP_P(( char **sap )); #define FILT_MAX_LINE_LEN 1024 diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index 13cb38eff7..316b908020 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -40,7 +40,6 @@ ldap_kerberos_bind1( LDAP *ld, char *dn ) BerElement *ber; char *cred; int rc, credlen; - char *ldap_get_kerberosv4_credentials(); #ifdef STR_TRANSLATION int str_translation_on; #endif /* STR_TRANSLATION */ @@ -147,7 +146,6 @@ ldap_kerberos_bind2( LDAP *ld, char *dn ) BerElement *ber; char *cred; int rc, credlen; - char *ldap_get_kerberosv4_credentials(); #ifdef STR_TRANSLATION int str_translation_on; #endif /* STR_TRANSLATION */ diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index a047cc54e8..64f4e7f913 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -155,6 +155,11 @@ void ldap_add_request_to_cache LDAP_P(( LDAP *ld, unsigned long msgtype, void ldap_add_result_to_cache LDAP_P(( LDAP *ld, LDAPMessage *result )); int ldap_check_cache LDAP_P(( LDAP *ld, unsigned long msgtype, BerElement *request )); +/* + * in dparse.c + */ +int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); +void free_strarray LDAP_P(( char **sap )); #ifdef HAVE_KERBEROS /* @@ -257,8 +262,8 @@ int ldap_t61_to_8859( char **bufp, unsigned long *buflenp, int free_input ); extern int ldap_8859_to_t61( char **bufp, unsigned long *buflenp, int free_input ); #endif /* LDAP_CHARSET_8859 == LDAP_DEFAULT_CHARSET */ + #endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */ LDAP_END_DECL -#endif /* STR_TRANSLATION && LDAP_DEFAULT_CHARSET */ #endif /* _LDAP_INT_H */ diff --git a/libraries/libldap/srchpref.c b/libraries/libldap/srchpref.c index 8920097c93..4210cab661 100644 --- a/libraries/libldap/srchpref.c +++ b/libraries/libldap/srchpref.c @@ -30,8 +30,6 @@ #include "ldap-int.h" #include "srchpref.h" -int next_line_tokens LDAP_P(( char **bufp, long *blenp, char ***toksp )); -void free_strarray LDAP_P(( char **sap )); static void free_searchobj LDAP_P(( struct ldap_searchobj *so )); static int read_next_searchobj LDAP_P(( char **bufp, long *blenp, struct ldap_searchobj **sop, int soversion )); diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index d8cfa25f7c..a5a279b42f 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -32,7 +32,6 @@ static LDAPMessage *ldap_msg_merge LDAP_P(( LDAP *ld, LDAPMessage *a, LDAPMessag static LDAPMessage *ldap_ufn_expand LDAP_P(( LDAP *ld, cancelptype cancelproc, void *cancelparm, char **dns, char *filter, int scope, char **attrs, int aonly, int *err )); -LDAPFiltDesc *ldap_ufn_setfilter LDAP_P(( LDAP *ld, char *fname )); /* * ldap_ufn_search_ctx - do user friendly searching; provide cancel feature;