bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autoconf: undocumented limitation


From: Ralf Wildenhues
Subject: Re: autoconf: undocumented limitation
Date: Fri, 10 Apr 2009 10:09:08 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Bruno, Eric,

* Eric Blake wrote on Mon, Apr 06, 2009 at 02:10:27PM CEST:
> According to Bruno Haible on 4/6/2009 4:00 AM:
> > Please say that the line length is limited. But what is LINE_MAX?

2K minus a couple of bytes is probably a safe value.

> > If you
> > mean LINE_MAX from <limits.h> [1], then such a statement is useless,
> > because this value is platform dependent, and a reference to POSIX [2]
> > does not help because HP-UX 11.00 and IRIX 6.5 are far away from POSIX
> > compliance.

This mixes up the requirements that POSIX poses upon your program
(gnulib-tool in this case) with the requirement you ask from the
system.

> There are very few POSIX utilities which are required to disregard
> LINE_MAX.  wc, sh, and tr come to mind.  But sed, awk, grep, and many
> other common text manipulation tools are allowed to fall flat on their
> face with long lines, just as they do with no trailing newline or embedded
> NUL.

> > I agree that it's too much hassles. The limitation is harmless for
> > files that are written manually, but can hurt for generated files.
> > The developers of tools that generate such files (gnulib-tool, in
> > this case, but also automake) need to be able to know about this
> > limitation.

This has been known and dealt with forever, many many times in Automake.
Line length issues have also been dealt with several times before in
gnulib-tool, maybe not for config.status input yet, but e.g., I've even
reported such issues in gnulib-tool before, for makefiles.

BTW, the Automake 1.10b has a new chapter "Length Limitations"
addressing slightly related issues for the Makefile.am author.

OK to push?

Thanks,
Ralf

    Document awk and config.status line length limitations.
    
    * doc/autoconf.texi (Configuration Actions): The input to
    config.status should have reasonable line length.
    (Limitations of Usual Tools): Document IRIX, HP-UX awk input
    line length limit.
    Report by Bruno Haible.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d715fe4..082d899 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -2155,7 +2155,8 @@ for more details.
 
 The @var{inputs} may be absolute or relative file names.  In the latter
 case they are first looked for in the build tree, and then in the source
-tree.
+tree.  Input files should be text files, a line length below 2K should
+be safe.
 
 @item commands
 Shell commands output literally into @file{config.status}, and
@@ -16367,6 +16368,9 @@ The original version of Awk had a limit of at most 99 
bytes per
 per run of non-special characters in a @code{printf} format, but these
 bugs have been fixed on all practical hosts that we know of.
 
+HP-UX 11.00 and IRIX 6.5 Awk require than input files have a line length
+of at most 3070 bytes.
+
 @item @command{basename}
 @c ---------------------
 @prindex @command{basename}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]