[Top][All Lists]

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

mingw-w64 CR handling

From: Gavin Smith
Subject: mingw-w64 CR handling
Date: Sun, 23 Oct 2022 10:52:19 +0100

On Sun, Oct 23, 2022 at 01:43:34AM +0200, Bruno Haible wrote:
> On mingw (the 'w64' flavour, that can be installed with Cygwin 2.9.0)
> - the compilation succeeds,
> - there is 1 test failure for 'info',
> - nearly all of the 'ii-????-test' tests fail,
> - no test failures in tp/tests/.
> The failing 'info' test is:
>   FAIL: t/where-dir-file.sh
> Find attached the log file.
> The output of the command
>   $ginfo --where file1
> is
>   ./../../info/t/infodir/file1.info<CR><LF>
> with a line ending of <CR><LF>, which is why
>   grep 't/infodir/file1.info$'
> fails.

In info.c the file name is printed with a simple printf:

            printf ("%s\n", ref_list[i]->filename);

We don't deal with line endings or "text mode" at all here - just
printing a string to stdout in the most straightforward way.

It appears that there is some disconnect between the compiler and
grep on mingw-w64.

Is mingw-w64 grep incompatible with a straightforward "Hello world" program,
so that if hello printed "Hello world", then

hello | grep 'world$'

would fail?  Or is there something else going on in how the 'info' program
is built?

> A possible fix is to replace
>   grep 't/infodir/file1.info$'
> with
>   tr -d '\r' | grep 't/infodir/file1.info$'
> Then the test passes.

Yes but I'd rather not complicate the code to deal with <CR>s.

reply via email to

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