Fix portability issue.

Move prototypes to proto-slap.h
This commit is contained in:
Kurt Zeilenga 2000-09-21 19:12:41 +00:00
parent bbae507a8f
commit cf17c168c5
2 changed files with 5 additions and 11 deletions

View file

@ -784,6 +784,9 @@ LDAP_SLAPD_F (int) ldap_syslog;
LDAP_SLAPD_F (char *) default_search_base;
LDAP_SLAPD_F (char *) default_search_nbase;
LDAP_SLAPD_F (int) nSaslRegexp;
LDAP_SLAPD_F (SaslRegexp_t*) SaslRegexp;
LDAP_SLAPD_F (ldap_pvt_thread_mutex_t) num_sent_mutex;
LDAP_SLAPD_F (long) num_bytes_sent;
LDAP_SLAPD_F (long) num_pdu_sent;

View file

@ -15,24 +15,15 @@
#include <ac/stdlib.h>
#include <stdio.h>
#define SLAPD_TOOLS
#include "slap.h"
#undef SLAPD_TOOLS
#include "proto-slap.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
#elif defined (HAVE_STRING_H)
#include <string.h>
#endif
#include <ac/string.h>
#ifdef HAVE_CYRUS_SASL
#include <limits.h>
#include <sasl.h>
#include <ldap_pvt.h>
extern int nSaslRegexp;
extern SaslRegexp_t *SaslRegexp;
#endif
@ -198,7 +189,7 @@ char *slap_sasl_regexp( char *saslname )
/* Match the normalized SASL name to the saslregexp patterns */
for( reg = SaslRegexp,i=0; i<nSaslRegexp; i++,reg++ ) {
if ( regexec( &reg->workspace, saslname, SASLREGEX_REPLACE,
reg->strings, 0) == REG_OK )
reg->strings, 0) == 0 )
break;
}