[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3398) Problem compiling CVS version



Kevin Spicer wrote:

>On Wed, 2004-11-17 at 19:40, Pierangelo Masarati wrote:
>  
>
>>>Just to let you know that the current CVS version of
>>>servers/slapd/back-monitor/database.c fails to build on Solaris 9 x86
>>>because the constant PATH_MAX is undefined.  This constant doesn't
>>>      
>>>
>>seem
>>    
>>
>>>to be referenced anywhere else in the sources other than database.c. 
>>>      
>>>
>>Replacing
>>    
>>
>>>PATH_MAX  with a real value allows everything to build ok
>>> 
>>>
>>>      
>>>
>>Already hacked; please test. p.
>>    
>>
>
>Thanks for that.  I haven't yet had an opportunity to compile (as I've
>got other things compiling), however it certainly looks like it should
>fix it.
>Having done a little more digging it appears that PATH_MAX is defined on
>Solaris 9 in /usr/include/limits.h.  I wonder whether...
>
>#ifndef _LIMITS_H
>#include <limits.h>
>#endif
>
>At some point may be a better solution (esp as limits.h on my system
>defines PATH_MAX as 1024).  I suspect the if/endif isn't necessary, but
>C isn't my first language.
>  
>
In Linux it's in <linux/limits.h>, which is included by <limits.h> as 
well.  I think the whole chain should get included automatically when 
including <unistd.h>.  In any case that part of code is temporary and 
will change shortly, that's why I don't want to spend so much time in 
cleaning it.

p.





    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497