Skip to content
Snippets Groups Projects
Commit df38bf83 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

apply FreeBSD changes to main branch

parents d4cfec86 8b2170bc
No related branches found
No related tags found
No related merge requests found
ldap_modrdn_s
ldap_modrdn2
ldap_modrdn2_s
ldap_modrdn_s.3
ldap_modrdn2.3
ldap_modrdn2_s.3
......@@ -20,7 +20,9 @@
#if defined(NeXT) || defined(VMS)
#include <stdlib.h>
#else /* next || vms */
#ifndef __FreeBSD__
#include <malloc.h>
#endif
#endif /* next || vms */
#if defined(BC31) || defined(_WIN32)
#include <stdarg.h>
......
......@@ -20,7 +20,9 @@
#if defined(NeXT) || defined(VMS)
#include <stdlib.h>
#else /* next || vms */
#ifndef __FreeBSD__
#include <malloc.h>
#endif
#endif /* next || vms */
#if defined( BC31 ) || defined( _WIN32 )
#include <stdarg.h>
......
......@@ -25,7 +25,9 @@
#if defined(NeXT) || defined(VMS)
#include <stdlib.h>
#else /* next || vms */
#ifndef __FreeBSD__
#include <malloc.h>
#endif
#endif /* next || vms */
#include <errno.h>
#include <sys/types.h>
......
......@@ -150,6 +150,14 @@ select_backend( char * dn )
for ( i = 0; i < nbackends; i++ ) {
for ( j = 0; backends[i].be_suffix != NULL &&
backends[i].be_suffix[j] != NULL; j++ ) {
/* Add greg@greg.rim.or.jp
* It's quick hack for cheep client
* Some browser offer a NULL base at ldap_search
*/
if(dnlen == 0) {
Debug( LDAP_DEBUG_TRACE, "select_backend: use default backend\n", 0, 0, 0 );
return (&backends[i]);
}
len = strlen( backends[i].be_suffix[j] );
if ( len > dnlen ) {
......
......@@ -68,7 +68,12 @@ daemon(
#else /* USE_SYSCONF */
dtblsize = getdtablesize();
#endif /* USE_SYSCONF */
/*
* Add greg@greg.rim.or.jp
*/
if(dtblsize > FD_SETSIZE) {
dtblsize = FD_SETSIZE;
}
c = (Connection *) ch_calloc( 1, dtblsize * sizeof(Connection) );
for ( i = 0; i < dtblsize; i++ ) {
......@@ -130,6 +135,7 @@ daemon(
(void) SIGNAL( SIGUSR1, (void *) do_nothing );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
(void) SIGNAL( SIGTERM, (void *) set_shutdown );
(void) SIGNAL( SIGINT, (void *) set_shutdown );
(void) SIGNAL( SIGHUP, (void *) set_shutdown );
Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
......@@ -352,6 +358,7 @@ set_shutdown()
pthread_kill( listener_tid, SIGUSR1 );
(void) SIGNAL( SIGUSR2, (void *) set_shutdown );
(void) SIGNAL( SIGTERM, (void *) set_shutdown );
(void) SIGNAL( SIGINT, (void *) set_shutdown );
(void) SIGNAL( SIGHUP, (void *) set_shutdown );
}
......
......@@ -20,9 +20,8 @@
* see Henry Spencer's regexp routines, or GNU Emacs pattern
* matching module.
*
* Modification history:
* Vendor Modification history:
*
* $Log: regex.c,v $
* Revision 1.2 1996/04/25 16:24:11 mcs
* make re_exec() match "" with ".*" and similar patterns
* hopefully this change doesn't break anything else!
......
......@@ -31,7 +31,9 @@
extern char *str_getline( char **next );
extern void ch_free( char *p );
#if !(defined(BSD) && (BSD >= 199306))
extern char *sys_errlist[];
#endif
/* Forward references */
static Rh *get_repl_hosts( char *, int *, char ** );
......
......@@ -44,9 +44,9 @@ extern void Re_dump( Re *re );
extern void Re_dump();
#endif /* NEEDPROTOS */
#if !(defined(BSD) && (BSD >= 199306))
extern char *sys_errlist[];
#endif
/*
* Lock the replication queue.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment