From: Kurt Zeilenga Date: Thu, 11 Feb 1999 22:54:04 +0000 (+0000) Subject: Minor changes to support MSVC. X-Git-Tag: OPENLDAP_REL_ENG_1_2_0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab200e353d3ce1853eb69b4f1161fbd8c6052460;p=thirdparty%2Fopenldap.git Minor changes to support MSVC. --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 17144523e7..e3654c62e9 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -331,6 +331,8 @@ char **argv; ldap_unbind( ld ); exit( rc ); + + return rc; /* not reached */ } diff --git a/clients/ud/group.c b/clients/ud/group.c index dff41cdf7b..9e32739f24 100644 --- a/clients/ud/group.c +++ b/clients/ud/group.c @@ -31,7 +31,7 @@ static char * bind_and_fetch(char *name); void add_group( char *name ) { - register int i, idx = 0, prompt = 0; + register int idx = 0, prompt = 0; char tmp[BUFSIZ], dn[BUFSIZ]; static LDAPMod *attrs[9]; LDAPMod init_rdn, init_owner, init_domain, @@ -154,7 +154,7 @@ add_group( char *name ) if (debug & D_GROUPS) { register LDAPMod **lpp; register char **cpp; - register int j; + register int i, j; printf(" About to call ldap_add()\n"); printf(" ld = 0x%x\n", ld); printf(" dn = [%s]\n", dn); @@ -724,7 +724,6 @@ mod_addrDN( char *group, int offset ) { char s[BUFSIZ], *new_value /* was member */, *values[2]; char attrtype[ 64 ]; - int i; LDAPMod mod, *mods[2]; LDAPMessage *mp; diff --git a/include/ac/unistd.h b/include/ac/unistd.h index f0d9c1ad72..3eb7c23e4c 100644 --- a/include/ac/unistd.h +++ b/include/ac/unistd.h @@ -27,6 +27,10 @@ extern char *crypt(); #endif +#ifndef HAVE_GETPASS +extern char* getpass LDAP_P((const char* prompt)); +#endif + /* getopt() defines may be in separate include file */ #if HAVE_GETOPT_H # include diff --git a/include/portable.h.nt b/include/portable.h.nt index eca97aa255..4db71c5ca9 100644 --- a/include/portable.h.nt +++ b/include/portable.h.nt @@ -29,6 +29,8 @@ #define strcasecmp stricmp #define strncasecmp strnicmp #define strdup _strdup +#define vsnprintf _vsnprintf +#define vsprintf _vsprintf /* define type for caddr_t */ typedef char * caddr_t; @@ -132,7 +134,7 @@ typedef char * caddr_t; /* #undef REENTRANT */ #endif #ifndef _REENTRANT -#undef _REENTRANT +/* #undef _REENTRANT */ #endif /* define this if needed to get threadsafe functions */ @@ -146,11 +148,11 @@ typedef char * caddr_t; /* #undef THREAD_SAFE */ #endif #ifndef _THREAD_SAFE -/* #undef _THREAD_SAFE * +/* #undef _THREAD_SAFE */ #endif /* define this if toupper() requires tolower() */ -#define C_UPPER_LOWER +#define C_UPPER_LOWER 1 /* define this to the number of arguments ctime_r() expects */ /* #undef CTIME_R_NARGS */ @@ -186,7 +188,7 @@ typedef char * caddr_t; #endif /* define if you have setproctitle() */ -#undef HAVE_SETPROCTITLE +/* #undef HAVE_SETPROCTITLE */ /* define this for connectionless LDAP support */ /* #undef LDAP_CONNECTIONLESS */ @@ -381,10 +383,10 @@ typedef char * caddr_t; /* #undef HAVE_THR_YIELD */ /* Define if you have the vsnprintf function. */ -/* #undef HAVE_VSNPRINTF */ +#define HAVE_VSNPRINTF 1 /* Define if you have the vsprintf function. */ -/* #undef HAVE_VSPRINTF */ +#define HAVE_VSPRINTF 1 /* Define if you have the waitpid function. */ #define HAVE_WAITPID 1 @@ -657,7 +659,6 @@ typedef char * caddr_t; /* #undef CROSS_COMPILING */ /* begin of postamble */ - #ifdef HAVE_STDDEF_H # include #endif diff --git a/libraries/libldif/libldif.dsp b/libraries/libldif/libldif.dsp index 9f0b6e8bb3..1b900d9d10 100644 --- a/libraries/libldif/libldif.dsp +++ b/libraries/libldif/libldif.dsp @@ -94,9 +94,5 @@ SOURCE=.\line64.c SOURCE=..\..\include\portable.h # End Source File -# Begin Source File - -SOURCE=..\libldap\print.c -# End Source File # End Target # End Project