-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ralf, According to Ralf Wildenhues on 9/18/2007 1:31 PM: > > Ignoring that, and assuming we only care about backslash-newline like in > Eric's example, a patch like the one below would be sufficient, but > config.h would not be any more readable than if you would not use > newlines in the first place. OK to apply? AFAICS it's a strict > improvement over what we have now. OTOH I'm not sure what to do with > the XFAILing `Define a newline' test we have now in tests/torture.at. I agree that your patch is a strict improvement over the current state of things. I also like Ralf Corsepius' analysis that, at least for now, AC_DEFINE should only make sense for the C pre-processor. My take is that we could start from this patch, then additionally add some checking that if the value argument to AC_DEFINE{,_UNQUOTED} is literal, an error is issued if it contains raw newlines. And if we do that, then the 'Define a newline' test should be altered to check that we correctly diagnose improper use of newline, while letting \-newline through. > > Getting the multi-line values through the whole machinery and at the > same time allowing values of arbitrary length (thus the need to either > retain backslash-newlines or insert some after certain lengths) or even > preserving readability of config.h (thus the need to retain the original > backslash-newlines) is more work. Extrapolating from the AC_SUBST work, > several weeks. @DEFS@ would be another step ('make' implementations > have ugly length limits too), but I would not see that as a priority, > as it can be worked around using AC_CONFIG_HEADERS. Yes, more could be done, but I think your patch below provided a good enough start that it is worth checking in a variant of it that also deals with the `define a newline' test. I'll see if I can get some time to work on that idea. > 2007-09-18 Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> > > * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER, AC_OUTPUT_MAKE_DEFS): > Remove backslash-newline combinations from define values. > * doc/autoconf.texi (Defining Symbols): Adjust. > * NEWS: Update. > * tests/torture.at (#define header templates): Extend test. > Suggestion by Eric Lemings. > - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG9RZd84KuGfSFAYARAjINAKC2rDsZBIqvsk1mHK0LrMzbI3MqdwCbBKaD J0FaFnAADTSVBc31jEgaag4= =uo9P -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf