bug-gnulib
[Top][All Lists]
Advanced

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

Re: Problem with add_exclude_file()


From: Bruno Haible
Subject: Re: Problem with add_exclude_file()
Date: Mon, 24 May 2021 15:46:34 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; )

Hi,

Gisle Vanem wrote:
> So I patched 'exclude.c' like this:
> --- a/lib/exclude.c 2021-03-17 21:03:14
> +++ b/lib/exclude.c 2021-05-24 13:33:05
> @@ -683,7 +683,7 @@
> 
>     if (use_stdin)
>       in = stdin;
> -  else if (! (in = fopen (file_name, "re")))
> +  else if (! (in = fopen (file_name, "r")))
>       return -1;
> 
> 
> a presto! GNU-diff now works fine. So what is
> this mode "re" that fails on Windows?

The 'e' modifier to fopen() has the effect of adding an
O_CLOEXEC to the underlying open() call.

It should be supported in GNU diff, because the 'exclude' module
depends on the 'fopen-gnu' module, and this module implemented the
'e' modifier.

What is the value of file_name here?

Can you create a Gnulib testdir of the 'exclude' module, and see
if it produces test failures in your environment. It should not.
In particular, the 'test-fopen-gnu' program should succeed.

Bruno




reply via email to

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