Roger Taylor · Jun 8

LDAP.mac -- Why use $$$WindowsCacheClient instead of $$$ISWINDOWS?

Reference: sample LDAP code routine LDAP.mac

Some IF statements reference macro $$$WindowsCacheClient as a boolean flag to mark if the client calling the LDAP server is running Windows. Other IF statements reference $$$ISWINDOWS. Are they not the same thing? That is, does the routine need $$$WindowsCacheClient at all?


#define WindowsCacheClient 1

 if $$$WindowsCacheClient,$$$WindowsLDAPServer {
Status'=$$$LDAPSUCCESS {
Status=Status_",ldap_Binds(AdminDN) - "_##Class(%SYS.LDAP).Err2String(Status)

 $$$ISWINDOWS,$$$UseSecureConnection {
 else {


Product version: IRIS 2020.1
$ZV: IRIS for Windows (x86-64) 2020.1 (Build 217_1U) Tue May 26 2020 20:41:06 EDT
1 0 2 75
Log in or sign up to continue

Methods how these macros are defined are quite different: $$$ISWINDOWS is calculated using system call and always 1 on Windows platform, in contrast $$$WindowsCacheClient is defined manually, so it and can be easily set to 0 if needed.

Many years ago I faced a problem with LDAP which was solved this way (I didn't change ISC code, it was my own "fork"). Don't remember other details, only the fact.

Thanks, Alexey. I suppose a separate macro could have some value in testing if nothing else.