Re: seekable stdin
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.gnu.m4.patches |
|---|---|
| Message-ID | <[email protected]> |
Eric Blake <ebb9 <at> byu.net> writes: > > I fixed this on the branch a while ago, but never ported it to head, in part > because cygwin inherited a newlib libc bug that prevented the test from working > (basically, exit and fclose were not flushing unprocessed data from input > streams). But as of today, the bug in newlib is fixed in CVS. > > 2006-12-14 Eric Blake <ebb9 <at> byu.net> > > * modules/m4.c (m4_sysval_flush): Flush stdin before exiting, as > required by POSIX. > * tests/others.at (stdin seekable): New test. And only now, six weeks later, am I repairing the testsuite failure that that patch introduced. I really should be testing my './configure --disable-shared' branch more often :) 2007-02-05 Eric Blake <[email protected]> * tests/others.at (stdin seekable): Fix bug in test. * ltdl/m4/gnulib-cache.m4: Gnulib module strstr no longer exists. Index: ltdl/m4/gnulib-cache.m4 =================================================================== RCS file: /sources/m4/m4/ltdl/m4/gnulib-cache.m4,v retrieving revision 1.21 diff -u -r1.21 gnulib-cache.m4 --- ltdl/m4/gnulib-cache.m4 9 Jan 2007 05:05:21 -0000 1.21 +++ ltdl/m4/gnulib-cache.m4 5 Feb 2007 16:18:16 -0000 @@ -15,11 +15,11 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnu --m4- base=ltdl/m4 --doc-base=doc --aux-dir=ltdl/config --libtool --macro-prefix=M4 assert avltree-oset binary-io clean-temp cloexec close-stream closeout config-h configmake dirname error exit fdl filenamecat fopen-safer free gendocs gettext gnupload mkstemp obstack progname regex regexprops-generic stdbool stdlib-safer strnlen strstr strtol tempname unlocked-io verror xalloc xalloc-die xstrndup xstrtol xvasprintf +# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnu --m4- base=ltdl/m4 --doc-base=doc --aux-dir=ltdl/config --libtool --macro-prefix=M4 assert avltree-oset binary-io clean-temp cloexec close-stream closeout config-h configmake dirname error exit fdl filenamecat fopen-safer free gendocs gettext gnupload mkstemp obstack progname regex regexprops-generic stdbool stdlib-safer strnlen strtol tempname unlocked-io verror xalloc xalloc-die xstrndup xstrtol xvasprintf # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) -gl_MODULES([assert avltree-oset binary-io clean-temp cloexec close-stream closeout config-h configmake dirname error exit fdl filenamecat fopen-safer free gendocs gettext gnupload mkstemp obstack progname regex regexprops-generic stdbool stdlib-safer strnlen strstr strtol tempname unlocked-io verror xalloc xalloc-die xstrndup xstrtol xvasprintf]) +gl_MODULES([assert avltree-oset binary-io clean-temp cloexec close-stream closeout config-h configmake dirname error exit fdl filenamecat fopen-safer free gendocs gettext gnupload mkstemp obstack progname regex regexprops-generic stdbool stdlib-safer strnlen strtol tempname unlocked-io verror xalloc xalloc- die xstrndup xstrtol xvasprintf]) gl_AVOID([]) gl_SOURCE_BASE([gnu]) gl_M4_BASE([ltdl/m4]) Index: tests/others.at =================================================================== RCS file: /sources/m4/m4/tests/others.at,v retrieving revision 1.29 diff -u -r1.29 others.at --- tests/others.at 19 Dec 2006 17:23:46 -0000 1.29 +++ tests/others.at 5 Feb 2007 16:18:16 -0000 @@ -1,5 +1,5 @@ # Hand crafted tests for GNU M4. -*- Autotest -*- -# Copyright (C) 2001, 2006 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -480,11 +480,14 @@ { echo "skipping: sed is too greedy on seekable stdin"; exit 77; }]) dnl Check external follow-on process, after fatal error. +dnl We can't use AT_CHECK_M4, so we must post-process stderr ourselves. AT_DATA([in.m4], [[dnl( 0)trailing data ]]) AT_CHECK([(m4 -E; cat) < in.m4], [0], [[trailing data -]], [[m4:stdin:1: Warning: dnl: extra arguments ignored: 1 > 0 +]], [stderr]) +AT_CHECK([[sed 's/^[^:]*[lt-]*m4[.ex]*:/m4:/' stderr]], [0], +[[m4:stdin:1: Warning: dnl: extra arguments ignored: 1 > 0 ]]) dnl Ensure that esyscmd resumes parsing where the child process left off.