Re: libldap cyrus.c and windows (RE24 release candidate)

2019-07-22 Thread Howard Chu
Quanah Gibson-Mount wrote:
> Having an issue with cyrus.c on windows.
> 
> I keep hitting:
> 
> openldap/libraries/libldap/cyrus.c: In function 'ldap_int_sasl_bind':
> openldap/libraries/libldap/cyrus.c:392:19: error: 'HOST_NAME_MAX' undeclared 
> (first use in this function); did you mean 'FILENAME_MAX'?
>  char my_hostname[HOST_NAME_MAX + 1];
>   ^
>   FILENAME_MAX
> 
> 
> Yet this code compiles just fine:
> 
> $ cat test.c
> #include 
> 
> void main() {
>  char my_hostname[HOST_NAME_MAX + 1];
> }
> 
> 
> In cyrus.c, we have:
> 
> #ifdef HAVE_CYRUS_SASL
> ...
> #ifdef HAVE_LIMITS_H
> #include 
> #endif
> ...
> 
> 
> in config.log, it has:
> 
> #define HAVE_CYRUS_SASL 1
> 
> and
> 
> #define HAVE_LIMITS_H 1
> 
> So the limits.h include file should be included.

And are they defined in portable.h?


-- 
  -- Howard Chu
  CTO, Symas Corp.   http://www.symas.com
  Director, Highland Sun http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



Re: libldap cyrus.c and windows (RE24 release candidate)

2019-07-22 Thread Quanah Gibson-Mount
--On Monday, July 22, 2019 5:55 PM -0700 Quanah Gibson-Mount 
 wrote:



--On Monday, July 22, 2019 4:33 PM -0700 Quanah Gibson-Mount
 wrote:


So the limits.h include file should be included.

Any thoughts?


Ok, it's using a different include path, and HOST_NAME_MAX is definitely
not in there.


Ok, general issue is that the patch for ITS#7585 is Linux specific, but the 
patch made no allowance for Windows.  I'm testing an ugly patch atm just to 
see if it'll allow Windows compilation.


--Quanah



--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:





Re: libldap cyrus.c and windows (RE24 release candidate)

2019-07-22 Thread Quanah Gibson-Mount
--On Monday, July 22, 2019 4:33 PM -0700 Quanah Gibson-Mount 
 wrote:



So the limits.h include file should be included.

Any thoughts?


Ok, it's using a different include path, and HOST_NAME_MAX is definitely 
not in there.


--Quanah



--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP: