threads / patch / 41916

patchcomment for a long #ifdef

Subject: [PATCH] comment for a long #ifdef

## tl;dr

4 messages between Apr 4, 2016 and Apr 4, 2016. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Ivan Pozdeev· Apr 4, 2016, 01:00 UTC · lore

--- compat/poll/poll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Show changes to compat/poll/poll.c +2 −2
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index db4e03e..5eb0280 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -441,7 +441,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
}

return rc;
-#else
+#else /* #ifndef WIN32_NATIVE */
static struct timeval tv0;
static HANDLE hEvent;
WSANETWORKEVENTS ev;
@@ -622,5 +622,5 @@ restart:
}

return rc;
-#endif
+#endif /* #ifndef WIN32_NATIVE */
}
-- 
1.9.5.msysgit.1


-- 
Regards,
Ivan
Eric Sunshine· Apr 4, 2016, 01:54 UTC · re: Ivan Pozdeev · lore

Re: [PATCH] comment for a long #ifdef

On Sun, Apr 3, 2016 at 9:00 PM, Ivan Pozdeev <vano@mail.mipt.ru> wrote:
> ---
Missing sign-off. See Documentation/SubmittingPatches.
Show 23 quoted lines
> compat/poll/poll.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/compat/poll/poll.c b/compat/poll/poll.c
> index db4e03e..5eb0280 100644
> --- a/compat/poll/poll.c
> +++ b/compat/poll/poll.c
> @@ -441,7 +441,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
> }
>
> return rc;
> -#else
> +#else /* #ifndef WIN32_NATIVE */
> static struct timeval tv0;
> static HANDLE hEvent;
> WSANETWORKEVENTS ev;
> @@ -622,5 +622,5 @@ restart:
> }
>
> return rc;
> -#endif
> +#endif /* #ifndef WIN32_NATIVE */
> }
Ivan Pozdeev· Apr 4, 2016, 17:23 UTC · re: Eric Sunshine · lore

Re: [PATCH] comment for a long #ifdef

Signed-off-by: Ivan Pozdeev
---
compat/poll/poll.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to compat/poll/poll.c +2 −2
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index db4e03e..5eb0280 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -441,7 +441,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
}

return rc;
-#else
+#else /* #ifndef WIN32_NATIVE */
static struct timeval tv0;
static HANDLE hEvent;
WSANETWORKEVENTS ev;
@@ -622,5 +622,5 @@ restart:
}

return rc;
-#endif
+#endif /* #ifndef WIN32_NATIVE */
}
-- 
1.9.5.msysgit.1


-- 
Regards,
Ivan
Junio C Hamano· Apr 4, 2016, 17:54 UTC · re: Ivan Pozdeev · lore

Re: [PATCH] comment for a long #ifdef

Ivan Pozdeev <vano@mail.mipt.ru> writes:
> ---
> compat/poll/poll.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
As Eric pointed out, please sign-off your patch.
Show 22 quoted lines
> diff --git a/compat/poll/poll.c b/compat/poll/poll.c
> index db4e03e..5eb0280 100644
> --- a/compat/poll/poll.c
> +++ b/compat/poll/poll.c
> @@ -441,7 +441,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
> }
>
> return rc;
> -#else
> +#else /* #ifndef WIN32_NATIVE */
> static struct timeval tv0;
> static HANDLE hEvent;
> WSANETWORKEVENTS ev;
> @@ -622,5 +622,5 @@ restart:
> }
>
> return rc;
> -#endif
> +#endif /* #ifndef WIN32_NATIVE */
> }
> -- 
> 1.9.5.msysgit.1

There also is an #ifndef/#else/#endif in abspath.c that is larger than a typical patch context; could you include a fix for that, too?

← back to recent threads