Minor adjustments to better handle NT vs UNIX.

This commit is contained in:
Kurt Zeilenga 1999-05-29 18:57:23 +00:00
parent 16366cff99
commit fbc0bd013e
7 changed files with 6 additions and 6 deletions

View file

@ -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%"

View file

@ -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"

View file

@ -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

View file

@ -5,6 +5,7 @@
#include "portable.h"
#include <stdlib.h>
#include <ac/string.h>
#include "lber-int.h"

View file

@ -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 );

View file

@ -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 );

View file

@ -66,7 +66,7 @@ oc_check_required( Entry *e, char *ocname )
{
ObjectClass *oc;
AttributeType *at;
int i, j;
int i;
Attribute *a;
char **pp;