Re: [PATCH 80/83] run-command: make dup_devnull() non static
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 6, 2016, 15:34 UTC
- Message-ID
- <alpine.DEB.2.20.1605061733170.2963@virtualbox>
- In-Reply-To
- <CAP8UFD35L8P2YJbbvg_-n9Nc61xMs+_2qBJwBxFzXeF-jA4WwQ@mail.gmail.com>
Hi Chris,
On Fri, 6 May 2016, Christian Couder wrote:
Show 29 quoted lines
> On Thu, May 5, 2016 at 10:07 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> > Am 05.05.2016 um 11:50 schrieb Christian Couder:
> >>
> >> On Mon, Apr 25, 2016 at 5:05 PM, Johannes Schindelin
> >> <Johannes.Schindelin@gmx.de> wrote:
> >>>
> >>> Hi Chris,
> >>>
> >>> On Sun, 24 Apr 2016, Christian Couder wrote:
> >>>
> >>>> diff --git a/run-command.c b/run-command.c
> >>>> index 8c7115a..29d2bda 100644
> >>>> --- a/run-command.c
> >>>> +++ b/run-command.c
> >>>> @@ -85,7 +85,7 @@ static inline void close_pair(int fd[2])
> >>>> }
> >>>>
> >>>> #ifndef GIT_WINDOWS_NATIVE
> >>>> -static inline void dup_devnull(int to)
> >>>> +void dup_devnull(int to)
> >>>> {
> >>>
> >>>
> >>> The #ifndef GIT_WINDOWS_NATIVE rings very, very loud alarm bells.
> >>
> >>
> >> Yeah, but I must say that I don't know what I should do about this.
> >> Do you have a suggestion? Should I try to implement the same function
> >> for Windows?No, you should change the code that requires that ugly dup()ing so that it can be configured to shut up.
Show 5 quoted lines
> > No, just remove the #ifndef brackets. There is already code in > > compat/mingw.c that treats the file name "/dev/null" specially. > > Ok, I will do that in the same patch though the "#ifndef > GIT_WINDOWS_NATIVE" was already there before.
The idea was that compat/mingw.c is *really* only for the MINGW version, not for the MSVC version.
Ciao, Dscho