]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/ldbm.c
ITS#3818 fix index_substr_any_step keyword
[openldap] / servers / slapd / back-ldbm / ldbm.c
index 11e7ea0cc54a4bb6f46e7e630b1a78bd0f70990a..66745ee6db81f6021ed813bc2e1596d1e7a6f5a3 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * Portions Copyright 1998-2003 Kurt D. Zeilenga.
  * Portions Copyright 1998-2001 Net Boolean Incorporated.
  * All rights reserved.
@@ -134,7 +134,11 @@ ldbm_malloc( size_t size )
 #endif
 
 static void
+#if DB_VERSION_X < 0x040300
 ldbm_db_errcall( const char *prefix, char *message )
+#else
+ldbm_db_errcall( const DB_ENV *env, const char *prefix, char *message )
+#endif
 {
 #ifdef LDAP_SYSLOG
        syslog( LOG_INFO, "ldbm: %s %s", prefix, message );
@@ -152,8 +156,16 @@ int ldbm_initialize( const char* home )
 
        {
                char *version;
+#ifdef HAVE_EBCDIC
+               char v2[1024];
+#endif
                int major, minor, patch;
                version = db_version( &major, &minor, &patch );
+#ifdef HAVE_EBCDIC
+               strcpy( v2, version );
+               __etoa( v2 );
+               version = v2;
+#endif
 
                if( major != DB_VERSION_MAJOR ||
                        minor < DB_VERSION_MINOR )