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?

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users

Reply via email to