From: Kurt Zeilenga Date: Sat, 29 May 1999 18:57:23 +0000 (+0000) Subject: Minor adjustments to better handle NT vs UNIX. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~479 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbc0bd013e3681125750dd44b46db0b3ed502f74;p=openldap Minor adjustments to better handle NT vs UNIX. --- diff --git a/include/ldapconfig.h.edit b/include/ldapconfig.h.edit index e99dbac074..687e9075f6 100644 --- a/include/ldapconfig.h.edit +++ b/include/ldapconfig.h.edit @@ -31,7 +31,6 @@ * SHARED DEFINITIONS * These are shared with Makefile and should not change via configure */ -#define DEFAULT_DIRSEP "/" #define DEFAULT_BINDIR "%BINDIR%" #define DEFAULT_SBINDIR "%SBINDIR%" #define DEFAULT_DATADIR "%DATADIR%" diff --git a/include/ldapconfig.h.nt b/include/ldapconfig.h.nt index 4590031ed0..5b21bea2b0 100644 --- a/include/ldapconfig.h.nt +++ b/include/ldapconfig.h.nt @@ -31,7 +31,6 @@ /* * SHARED DEFINITIONS - things you should change */ -#define DEFAULT_DIRSEP "\\" #define DEFAULT_BINDIR "C:\\OpenLDAP\\bin" #define DEFAULT_SBINDIR "C:\\OpenLDAP\\sbin" #define DEFAULT_DATADIR "C:\\OpenLDAP\\share" diff --git a/include/portable.h.nt b/include/portable.h.nt index 89f488c59a..91dc847022 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -21,6 +21,7 @@ #define OPENLDAP_PACKAGE "OpenLDAP" #define OPENLDAP_VERSION "-devel" #define EXEEXT ".exe" +#define DIRSEP "\\" #if defined( _DEBUG ) && !defined( LDAP_DEBUG ) #define LDAP_DEBUG 1 diff --git a/libraries/liblber/memory.c b/libraries/liblber/memory.c index ee5f4e8ede..f893cfab7c 100644 --- a/libraries/liblber/memory.c +++ b/libraries/liblber/memory.c @@ -5,6 +5,7 @@ #include "portable.h" #include +#include #include "lber-int.h" diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index 3da8ed4226..b624ef55a3 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -35,7 +35,7 @@ ldbm_cache_open( struct stat st; #endif - sprintf( buf, "%s%s%s%s", li->li_directory, DEFAULT_DIRSEP, name, suffix ); + sprintf( buf, "%s%s%s%s", li->li_directory, DIRSEP, name, suffix ); Debug( LDAP_DEBUG_TRACE, "=> ldbm_cache_open( \"%s\", %d, %o )\n", buf, flags, li->li_mode ); diff --git a/servers/slapd/back-ldbm/startup.c b/servers/slapd/back-ldbm/startup.c index 8c2e0033cc..972ea04725 100644 --- a/servers/slapd/back-ldbm/startup.c +++ b/servers/slapd/back-ldbm/startup.c @@ -51,11 +51,11 @@ ldbm_back_startup( /* if the data directory is not an absolute path, have it relative to the current working directory (which should not be configured !) */ - if ( *li->li_directory != *DEFAULT_DIRSEP ) { + if ( *li->li_directory != *DIRSEP ) { char cwd[MAXPATHLEN]; (void) getcwd( cwd, MAXPATHLEN ); - sprintf( cwd, "%s%s%s", cwd, DEFAULT_DIRSEP, li->li_directory ); + sprintf( cwd, "%s%s%s", cwd, DIRSEP, li->li_directory ); free( li->li_directory ); li->li_directory = strdup( cwd ); diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index 25056be2d0..a200bd2fdd 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -66,7 +66,7 @@ oc_check_required( Entry *e, char *ocname ) { ObjectClass *oc; AttributeType *at; - int i, j; + int i; Attribute *a; char **pp;