This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix file descriptor existence of MinGW.
On 8/6/19 5:35 PM, Martin Sebor wrote:
> On 8/6/19 6:04 AM, Martin Liška wrote:
>> The patch is about proper checking of file descriptors on Windows.
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> Is there a way to share the definition of the new function so
> it doesn't have to be duplicated?
I would like to, but I'm wondering which header and source file
should I use for it?
> Other than that, I'm wondering if the guard for F_GETFD is
> necessary and when (the original code didn't guard its use).
Because the value is not defined on MinGW targets where _get_osfhandle
call must be used ;)
>> @Pekka: Can you please test it on Windows?
>> Ready to be installed?
>> 2019-08-06 Martin Liska <firstname.lastname@example.org>
>> PR bootstrap/91352
>> * gcc.c (fd_exists): New.
>> (driver::detect_jobserver): Use fd_exists.
>> * lto-wrapper.c (fd_exists): New.
>> (jobserver_active_p): Use fd_exists.
>> gcc/gcc.c | 19 +++++++++++++++++--
>> gcc/lto-wrapper.c | 19 +++++++++++++++++--
>> 2 files changed, 34 insertions(+), 4 deletions(-)