-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there any portable way to process files that contain NUL bytes? I'm working on making m4 1.6 transparently handle NUL, and want to post-process the output to normalize error messages while still verifying that NUL bytes appeared where expected on stderr. But on Solaris, the native sed strips NUL bytes before processing the line (NUL bytes cannot appear in text files, and POSIX does not define behavior on non-text files, so this is not a bug, just a difference from GNU diff). As a result, the m4 testsuite either fails (if I only postprocess the captured stderr and not the expected error) or can have false positives (if both stderr and expected error are normalized, then regressions involving added or missing NUL are not detected). I don't want to require perl for just this one test; m4 seems fundamental enough to keep the testsuite restricted to the GNU coding standards set of tools. The Solaris man pages mention that /usr/xpg4/bin/tr can handle NUL bytes, but not /usr/bin/tr; maybe I could search for an adequate tr, and change all NUL to some other byte that does not otherwise appear in my expected output (with the added benefit that diff might not give up early with the complaint that the files are binary), but I don't know if that is portable either. Any suggestions? Is this worth documenting in the autoconf manual? - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjkN04ACgkQ84KuGfSFAYDOlACghSRq8rKgoGeRMav1zNqhGV7+ mSoAoKeL615d5MOBCBcQ4wkrgX0M4pzs =niYA -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf