/* txn.c - TP support functions of the bdb2 backend */
+#include "portable.h"
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include "txn.h"
fileinfo->dbc_refcnt = 1;
- sprintf( buf, "%s%s%s", li->li_directory, DEFAULT_DIRSEP,
- fileinfo->dbc_name );
+ sprintf( buf, "%s" LDAP_DIRSEP "%s",
+ li->li_directory, fileinfo->dbc_name );
+
if ( stat( buf, &st ) == 0 ) {
fileinfo->dbc_blksize = st.st_blksize;
} else {
if ( open && strcasecmp( fileName, "objectclass" )) {
/* re-use filename to get the complete path */
- sprintf( fileName, "%s%s%s",
- li->li_directory, DEFAULT_DIRSEP, p->dbc_name );
+ sprintf( fileName, "%s" LDAP_DIRSEP "%s",
+ li->li_directory, p->dbc_name );
/* since we have an mpool, we should not define a cache size */
p->dbc_db = bdb2i_db_open( fileName, DB_TYPE,
DB_INFO dbinfo;
char fileName[MAXPATHLEN];
- sprintf( fileName, "%s%s%s",
- li->li_directory, DEFAULT_DIRSEP, NEXTID_NAME );
+ sprintf( fileName, "%s" LDAP_DIRSEP "%s",
+ li->li_directory, NEXTID_NAME );
/* try to open the file for read and write */
memset( &dbinfo, 0, sizeof( dbinfo ));
for ( dbFile = head->dbFiles; dbFile; dbFile = dbFile->next ) {
char fileName[MAXPATHLEN];
- sprintf( fileName, "%s%s%s",
- li->li_directory, DEFAULT_DIRSEP, dbFile->dbc_name );
+ sprintf( fileName, "%s" LDAP_DIRSEP "%s",
+ li->li_directory, dbFile->dbc_name );
/* since we have an mpool, we should not define a cache size */
dbFile->dbc_db = bdb2i_db_open( fileName, DB_TYPE,