lber: ifdef'ed out lber_..set_nonblock() function because it used ioctl's.
If it remains, it needs to be written to support various methods for
setting non-blocking. ioctls should probably be last choice. configure
could detect existance of fcntl(), ioctl(), etc.
bdb2:
added .dsp/.dsw files and did some basic cleanup (still needs work).
#define strdup _strdup
#define vsnprintf _vsnprintf
#define vsprintf _vsprintf
+#define sleep _sleep
/* define type for caddr_t */
typedef char * caddr_t;
+/* we have NT threads */
+#define HAVE_NT_THREADS 1
+
/* we have spawnlp instead of fork/execlp */
#define HAVE_SPAWNLP 1
/* we have <conio.h> */
#define HAVE_CONIO_H 1
+/* we have <direct.h> */
+#define HAVE_DIRECT_H 1
+
/* we have <io.h> */
#define HAVE_IO_H 1
/* we have <process.h> */
#define HAVE_PROCESS_H 1
+#define LDAP_SIGUSR1 SIGILL
+#define LDAP_SIGUSR2 SIGTERM
+
+#define MAXPATHLEN _MAX_PATH
+
/* end of MSVC5 specific entries */
/* --------------------------------------------------- */
/* #undef HAVE_BERKELEY_DB */
/* define if you have berkeley db2 */
-/* #undef HAVE_BERKELEY_DB2 */
+#define HAVE_BERKELEY_DB2 1
/* define if you have crypt */
/* #undef HAVE_CRYPT */
/* #undef LDAP_SYSLOG */
/* define this to use DBBTREE w/ LDBM backend */
-/* #undef LDBM_USE_DBBTREE */
+#define LDBM_USE_DBBTREE 1
/* define this to use DBHASH w/ LDBM backend */
/* #undef LDBM_USE_DBHASH */
/* define this for ACL Group support */
-/* #undef SLAPD_ACLGROUPS */
+#define SLAPD_ACLGROUPS 1
/* define this to use SLAPD Berkeley DB2 backend */
-/* #undef SLAPD_BDB2 */
+#define SLAPD_BDB2 1
/* define this for ClearText password support */
-/* #undef SLAPD_CLEARTEXT */
+#define SLAPD_CLEARTEXT 1
/* define this for crypt(3) password support */
/* #undef SLAPD_CRYPT */
/* define this to use SLAPD LDBM backend */
-/* #undef SLAPD_LDBM */
+/* #define SLAPD_LDBM 1 */
/* define this to use SLAPD passwd backend */
/* #undef SLAPD_PASSWD */
/* #undef HAVE_CRYPT_H */
/* Define if you have the <db.h> header file. */
-/* #undef HAVE_DB_H */
+#define HAVE_DB_H 1
/* Define if you have the <db_185.h> header file. */
/* #undef HAVE_DB_185_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
/* Define if you have the <lwp/lwp.h> header file. */
/* #undef HAVE_LWP_LWP_H */
SOURCE=..\..\include\portable.h
# End Source File
+# Begin Source File
+
+SOURCE=.\sockbuf.c
+# End Source File
# End Target
# End Project
static int
status_is_ok( Sockbuf *sb )
{
- int obr;
- int osr;
- obr = sb->sb_buf_ready;
+ int obr = sb->sb_buf_ready;
#ifdef USE_SASL
- osr = sb->sb_sec_ready;
+ int osr = sb->sb_sec_ready;
#endif
+
update_status(sb);
if (obr!=sb->sb_buf_ready)
return 0;
+
#ifdef USE_SASL
if (osr!=sb->sb_sec_ready)
return 0;
#endif
+
return 1;
}
#endif
#ifdef USE_SASL
}
#endif
+
+ return ret;
}
int lber_pvt_sb_close( Sockbuf *sb )
return 0;
}
+#ifdef USE_NONBLOCK
int lber_pvt_sb_set_nonblock( Sockbuf *sb, int nb )
{
assert( status_is_ok(sb) );
}
return 0;
}
+#endif
#define sockbuf_buf_init( bb ) \
(bb)->buf_base=NULL;\
#include "portable.h"
#include <stdio.h>
-#include <sys/time.h>
-#include <unistd.h>
#include <ac/string.h>
+#include <ac/time.h>
+#include <ac/unistd.h>
#include "slap.h"
#include "back-bdb2.h"
--- /dev/null
+# Microsoft Developer Studio Project File - Name="backbdb2" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=backbdb2 - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "backbdb2.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "backbdb2.mak" CFG="backbdb2 - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "backbdb2 - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "backbdb2 - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+
+!IF "$(CFG)" == "backbdb2 - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "backbdb2 - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF
+
+# Begin Target
+
+# Name "backbdb2 - Win32 Release"
+# Name "backbdb2 - Win32 Debug"
+# End Target
+# End Project
--- /dev/null
+Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "backbdb2"=".\backbdb2.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
static int
cache_entry_private_init( Entry*e )
{
- struct ldbm_entry_info *lei;
-
#ifdef LDAP_DEBUG
assert( e->e_private == NULL );
#endif
static int
cache_entry_private_destroy( Entry*e )
{
- struct ldbm_entry_info *lei;
-
#ifdef LDAP_DEBUG
assert( e->e_private );
#endif
e.e_id = id;
-try_again:
/* set cache mutex */
ldap_pvt_thread_mutex_lock( &cache->c_mutex );
{
struct dbcache *db;
Datum key;
- int len, rc;
- ID_BLOCK *idl;
char buf[20];
ldbm_datum_init( key );
{
struct dbcache *db;
Datum key;
- int len, rc;
- ID_BLOCK *idl;
char buf[20];
Debug( LDAP_DEBUG_TRACE, "=> bdb2i_id2children_remove( %ld, %ld )\n",
/* Allocate an ID_BLOCK with room for nids ids */
ID_BLOCK *
-bdb2i_idl_alloc( int nids )
+bdb2i_idl_alloc( unsigned long nids )
{
ID_BLOCK *new;
* 3 id not inserted, block must be split
*/
int
-bdb2i_idl_insert( ID_BLOCK **idl, ID id, int maxids )
+bdb2i_idl_insert( ID_BLOCK **idl, ID id, unsigned long maxids )
{
- unsigned int i, j;
+ unsigned long i, j;
if ( ID_BLOCK_ALLIDS( *idl ) ) {
return( 2 ); /* already there */
)
{
Attribute *ap;
- char *dnval;
struct berval bv;
struct berval *bvals[2];
{
struct ldbminfo *li;
char *argv[ 4 ];
- int i;
/* allocate backend-database-specific stuff */
li = (struct ldbminfo *) ch_calloc( 1, sizeof(struct ldbminfo) );
char *matched;
LDAPModList *ml;
Entry *e;
- int i, err;
+ int err;
Debug(LDAP_DEBUG_ARGS, "bdb2i_back_modify:\n", 0, 0, 0);
* idl.c
*/
-ID_BLOCK * bdb2i_idl_alloc LDAP_P(( int nids ));
+ID_BLOCK * bdb2i_idl_alloc LDAP_P(( unsigned long nids ));
ID_BLOCK * bdb2i_idl_allids LDAP_P(( BackendDB *be ));
void bdb2i_idl_free LDAP_P(( ID_BLOCK *idl ));
ID_BLOCK * bdb2i_idl_fetch LDAP_P(( BackendDB *be, struct dbcache *db, Datum key ));
int bdb2i_idl_insert_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
-int bdb2i_idl_insert LDAP_P(( ID_BLOCK **idl, ID id, int maxids ));
+int bdb2i_idl_insert LDAP_P(( ID_BLOCK **idl, ID id, unsigned long maxids ));
int bdb2i_idl_delete_key LDAP_P(( BackendDB *be, struct dbcache *db, Datum key, ID id ));
ID_BLOCK * bdb2i_idl_intersection LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
ID_BLOCK * bdb2i_idl_union LDAP_P(( BackendDB *be, ID_BLOCK *a, ID_BLOCK *b ));
#include <ac/string.h>
#include <ac/socket.h>
+#include <ac/time.h>
#include "slap.h"
#include "back-bdb2.h"
Attribute *ref;
char *matched = NULL;
int rmaxsize, nrefs;
- char *rbuf, *rcur, *r;
+ char *rbuf, *rcur;
int nentries = 0;
char *realBase;
strncmp( e->e_ndn, "REF=", 4 ) == 0 &&
(ref = attr_find( e->e_attrs, "ref" )) != NULL )
{
- int i, len;
+ int i;
if ( ref->a_vals == NULL ) {
Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n",
)
{
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
- int rc;
- ID id;
ID_BLOCK *idl;
Entry *e;
#include <ac/string.h>
#include <ac/socket.h>
+#include <ac/unistd.h>
+
+#ifdef HAVE_DIRECT_H
+#include <direct.h>
+#endif
#include "ldapconfig.h"
#include "slap.h"
#include "portable.h"
#include <stdio.h>
-#include <sys/time.h>
-#include <unistd.h>
#include <ac/string.h>
+#include <ac/time.h>
+#include <ac/unistd.h>
#include "slap.h"
#include "back-bdb2.h"