Re: [PATCH v3 3/8] mingw: make failures to unlink or move raise a question

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v3 3/8] mingw: make failures to unlink or move raise a question

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:15

Johannes Schindelin [off-list ref] writes:
quoted
quoted
@@ -129,6 +130,78 @@ static inline int is_file_in_use_error(DWORD errcode)
       return 0;
 }

+static int read_yes_no_answer()
Perhaps "static int read_yes_no_answer(void)" for portability?
LOL. This file is called compat/mingw.c... :-)
I had the same reaction.  Maybe MinGW will get a different compiler
someday ;-)
But I have no objection to stay with the convention of the rest of Git. 
Nobody needs to convince me that consistency is good.
I recall there are a few old-style declaration in compat/ directory,
especially in borrowed code like nedmalloc/ and possibly regex/, and
I am not so sure if we want to touch them.

I'll leave this up to msysgit folks.

Thanks.

Re: Re: [PATCH v3 3/8] mingw: make failures to unlink or move raise a question

From: Heiko Voigt <hidden>
Date: 2016-06-15 22:50:15

On Tue, Dec 14, 2010 at 07:05:00PM -0800, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
quoted
@@ -129,6 +130,78 @@ static inline int is_file_in_use_error(DWORD errcode)
       return 0;
 }

+static int read_yes_no_answer()
Perhaps "static int read_yes_no_answer(void)" for portability?
LOL. This file is called compat/mingw.c... :-)
I had the same reaction.  Maybe MinGW will get a different compiler
someday ;-)
quoted
But I have no objection to stay with the convention of the rest of Git. 
Nobody needs to convince me that consistency is good.
I recall there are a few old-style declaration in compat/ directory,
especially in borrowed code like nedmalloc/ and possibly regex/, and
I am not so sure if we want to touch them.

I'll leave this up to msysgit folks.
I do not mind changing this sincce I need to change this patch anyway.
Will do in the next iteration.

Cheers Heiko

Re: [PATCH v3 3/8] mingw: make failures to unlink or move raise a question

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:50:15

On Wed, Dec 15, 2010 at 4:05 AM, Junio C Hamano [off-list ref] wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
quoted
@@ -129,6 +130,78 @@ static inline int is_file_in_use_error(DWORD errcode)
       return 0;
 }

+static int read_yes_no_answer()
Perhaps "static int read_yes_no_answer(void)" for portability?
LOL. This file is called compat/mingw.c... :-)
I had the same reaction.  Maybe MinGW will get a different compiler
someday ;-)
We already have; compat/msvc.c includes compat/mingw.c. mingw.c is
called mingw.c because it was the first native windows port, not
because it will always be compiled with MinGW. So this file is REALLY
more about the OS than the compiler.

I don't think MSVC has a problem with this declaration either, but
wouldn't it be nicer if we had Windows-code that was as portable as
possible across compilers? I've also been playing around with the idea
of using LLVM's clang for Git on Windows, because it's support for
cross compiling between 32bit and 64bit is a bit less nasty than
MinGW's. This might never come happen, and I don't know if clang
supports this or not. And then there's Intel's ICC that some times
outperforms GCC. I don't think it would hurt fixing it in case people
will port - one less trip-wire in the code.

But I of course only suggest this because this is new code. It's easy
to change it to be slightly more portable (and more consistent with
the rest of the code base), so why not?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help