On Mon, Nov 24, 2014 at 04:21:11PM +0100, a b via smartos-discuss wrote:

> > H5Fint.c: In function 'H5F_build_actual_name':
> > H5Fint.c:1572:27: error: 'PATH_MAX' undeclared (first use in this function)
> 
> PATH_MAX is defined in /usr/include/limits.h. Please check which .h files 
> H5Fint.c is including, and fgrep for "limits.h" in them.
> 
> If none of the header files include it, add the following line to one of 
> them, or even to
> H5Fint.c (least preferred):
> 
> #include <limits.h>

If the C file were including headers that in turn included limits.h,
this problem could not be occurring.  So there's no point grepping
around for it.

To be more specific, the header should be included by the file that
references its contents.  So if PATH_MAX is being used in foo.h, then
foo.h should have the above #include; if it's being used in H5Fint.c,
then H5Fint.c should have the #include, etc.  Adding more includes to
random headers is not preferred at all; there is a simple and specific
way to tell what file should be including the header.

Without being deeply familiar with this software, I cannot tell you
exactly which file(s) require change.  You need to see where PATH_MAX is
being referenced.


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to