On 10/13/13 10:34, Pino Toscano wrote:
> Hi,
>
> attached there is a patch for autogen to fix the definition of
> MAXPATHLEN when not defined already (either not directly or because
> PATH_MAX is not defined either).
>
> This caused a build failure in sharutils (which embeds the libopts part
> of autogen) on GNU/Hurd (which provides no PATH_MAX nor MAXPATHLEN) [1].
> This happens because in autogen's autoopts.h there is:
> # if defined(PATH_MAX) && (PATH_MAX > MAXPATHLEN)
> which triggers a preprocessor parsing error when MAXPATHLEN is defined
> as (size_t)4096.
I think the correct fix would be to ensure that "size_t" is defined.
"size_t" is defined by <sys/types.h>, <unistd.h> and/or <stdio.h>, depending
on platform, and all are included before any attempt is made to hack around
MAXPATHLEN. So what's going on on Hurd? Is there a bug that "config.h"
is not included first?
|