Re: 1.10a instspc.test failure

2007-01-18 Thread Paul Eggert
Ralf Wildenhues [EMAIL PROTECTED] writes:

 2007-01-17  Ralf Wildenhues  [EMAIL PROTECTED]

   * doc/autoconf.texi (Setting Output Variables): Mention that
   all non-NUL characters are ok in substituted values.
   * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Fix comment typo.
   (_AC_OUTPUT_FILES_PREPARE): Test and use backslash escaping of
   carriage return for $AWK, needed for BSD awk.
   * tests/torture.at (Substitute and define special characters):
   Test all 8 bit non-NUL characters.
   Report against Automake by Patrick Welche.

That looks good to me, thanks.  (And beyond the call of duty.)

Please install.  I wouldn't bother with Mingw.




Re: 1.10a instspc.test failure

2007-01-18 Thread Ralf Wildenhues
* Paul Eggert wrote on Fri, Jan 19, 2007 at 04:59:05AM CET:
 
  * doc/autoconf.texi (Setting Output Variables): Mention that
  all non-NUL characters are ok in substituted values.
  * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Fix comment typo.
  (_AC_OUTPUT_FILES_PREPARE): Test and use backslash escaping of
  carriage return for $AWK, needed for BSD awk.
  * tests/torture.at (Substitute and define special characters):
  Test all 8 bit non-NUL characters.
  Report against Automake by Patrick Welche.

 Please install.  I wouldn't bother with Mingw.

Done, thanks.

Cheers,
Ralf




Re: 1.10a instspc.test failure

2007-01-16 Thread Paul Eggert
Ralf Wildenhues [EMAIL PROTECTED] writes:

 -is called.  The value can contain newlines.
 +is called.  The value can contain all ASCII characters except for
 +the @code{NUL} character and carriage return; newline is ok to use.

If we can assume POSIX conformance with a reasonable C locale, the
value should be able to contain any non-NUL character.  There might be
a line length limit, but that's a different issue.

So I'd rather not document the problem with carriage return as a
feature of Autoconf.  It would be OK for now to document it as a bug,
though.  Something like this:

  In principle the value can contain any [EMAIL PROTECTED] character,
  including newline.  However, due to deficiencies in common Awk
  implementations, it is unwise to put carriage returns or
  [EMAIL PROTECTED] characters into the value.




Re: 1.10a instspc.test failure

2007-01-15 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Mon, Jan 08, 2007 at 08:14:45PM CET:
 * Patrick Welche wrote on Sat, Dec 23, 2006 at 11:12:03PM CET:

 | ^I  S[prefix]=/  
 | sed: stdout: Broken pipe
 
 Not sure what to do.  Does it swallow this with escaping?  Try
   awk 'BEGIN { x = a\^Mb; print x }'  file

Hmm.  The escaping of CR would certainly have to be optional, as some
awk implementations otherwise output an extra backslash.

Anyway.  Some testing reveals issues with the NUL character (mawk,
awk on FreeBSD, OpenBSD, OSF), CR (FreeBSD, OpenBSD), characters
above \127 (gawk, mawk).

Not having tested further, how about this patch to fix the Autoconf side
of this bug report?  Should we make provisions for hosts without a
suitable `printf'?  Do we intend to port to non-ASCII systems?
Do we care about CR being supported (at the cost of an extra test;
note that not supporting CR is a regression over 2.60)?

Cheers,
Ralf

2007-01-16  Ralf Wildenhues  [EMAIL PROTECTED]

* doc/autoconf.texi (Setting Output Variables): Mention
limitations in substituted variable values.
* tests/torture.at (Substitute and define special characters):
Test all characters we claim to support.
Report against Automake by Patrick Welche.

Index: doc/autoconf.texi
===
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1125
diff -u -r1.1125 autoconf.texi
--- doc/autoconf.texi   8 Jan 2007 19:54:10 -   1.1125
+++ doc/autoconf.texi   16 Jan 2007 06:59:43 -
@@ -8354,7 +8354,8 @@
 or more makefiles).  This means that @code{AC_OUTPUT}
 replaces instances of @samp{@@@var{variable}@@} in input files with the
 value that the shell variable @var{variable} has when @code{AC_OUTPUT}
-is called.  The value can contain newlines.
+is called.  The value can contain all ASCII characters except for
+the @code{NUL} character and carriage return; newline is ok to use.
 Variable occurrences should not overlap: e.g., an input file should
 not contain @samp{@@@var{var1}@@@var{var2}@@} if @var{var1} and @var{var2}
 are variable names.
Index: tests/torture.at
===
RCS file: /cvsroot/autoconf/autoconf/tests/torture.at,v
retrieving revision 1.79
diff -u -r1.79 torture.at
--- tests/torture.at20 Dec 2006 00:09:44 -  1.79
+++ tests/torture.at16 Jan 2007 06:59:44 -
@@ -632,18 +632,34 @@
 [EMAIL PROTECTED]@@bar@
 ])
 
+AT_DATA([Zardoz.in], [EMAIL PROTECTED]@
+])
+
 AT_CONFIGURE_AC(
 [[foo=AS@[EMAIL PROTECTED]([[X*'[]+ , `\($foo \ \\ \\\  \ \\ \\\ 
!]])
 bar=@foo@ @baz@
 baz=bla
+for i in 0 1; do
+  for j in 0 1 2 3 4 5 6 7; do
+for k in 0 1 2 3 4 5 6 7; do
+  case $i$j$k in
+  000 | 013) ;;
+  177) printf \\$i$j$k\\n;;
+  *) printf \\$i$j$k;;
+  esac
+done
+  done
+done allowed-chars
+zardoz=`cat allowed-chars`
 AC_SUBST([foo])
 AC_SUBST([bar])
 AC_SUBST([baz])
+AC_SUBST([zardoz])
 file=File
 AC_SUBST_FILE([file])
 AC_DEFINE([foo], [[X*'[]+ , `\($foo !]], [Awful value.])
 AC_PROG_AWK
-AC_CONFIG_FILES([Foo])]])
+AC_CONFIG_FILES([Foo Zardoz])]])
 
 AT_CHECK_AUTOCONF
 AT_CHECK_AUTOHEADER
@@ -663,6 +679,7 @@
 [EMAIL PROTECTED]@
 @[EMAIL PROTECTED]
 ]])
+  AT_CHECK([cmp allowed-chars Zardoz])
   AT_CHECK_DEFINES([[#define foo X*'[]+ , `\($foo !
 ]])
 done