{"thread":{"id":"24735","subject":"[PATCH il/rfc-remote-fd-ext] Fix build on Windows","startedAt":"2010-08-13T22:09:19Z","lastAt":"2010-08-14T18:31:46Z","messageCount":3,"participants":["Johannes Sixt","Ilari Liusvaara"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"148046","messageId":"201008140009.19291.j6t@kdbg.org","threadId":"24735","inReplyTo":null,"subject":"[PATCH il/rfc-remote-fd-ext] Fix build on Windows","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-08-13T22:09:19Z","receivedAt":"2010-08-13T22:09:19Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"This adds the necessary #defines so that the programs can be built, but\nsince the poll emulation is not extended to support POLLOUT and POLLNVAL,\nthe resulting programs will most likely not function properly. (The test\ndoes not check them, yet.)\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n compat/mingw.h |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 3b2477b..f27a7b6 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -23,6 +23,9 @@ typedef int pid_t;\n #define WEXITSTATUS(x) ((x) & 0xff)\n #define WTERMSIG(x) SIGTERM\n \n+#define EWOULDBLOCK EAGAIN\n+#define SHUT_WR SD_SEND\n+\n #define SIGHUP 1\n #define SIGQUIT 3\n #define SIGKILL 9\n@@ -50,6 +53,8 @@ struct pollfd {\n };\n #define POLLIN 1\n #define POLLHUP 2\n+#define POLLOUT 4\n+#define POLLNVAL 8\n #endif\n \n typedef void (__cdecl *sig_handler_t)(int);\n-- \n1.7.1.402.gf1eeb\n"},{"id":"148078","messageId":"20100814093801.GA28522@LK-Perkele-V2.elisa-laajakaista.fi","threadId":"24735","inReplyTo":"201008140009.19291.j6t@kdbg.org","subject":"Re: [PATCH il/rfc-remote-fd-ext] Fix build on Windows","fromName":"Ilari Liusvaara","fromEmail":"ilari.liusvaara@elisanet.fi","sentAt":"2010-08-14T09:38:01Z","receivedAt":"2010-08-14T09:38:01Z","isPatch":true,"sender":{"key":"ilari.liusvaara@elisanet.fi","avatar":null},"body":"On Sat, Aug 14, 2010 at 12:09:19AM +0200, Johannes Sixt wrote:\n> This adds the necessary #defines so that the programs can be built, but\n> since the poll emulation is not extended to support POLLOUT and POLLNVAL,\n> the resulting programs will most likely not function properly. (The test\n> does not check them, yet.)\n\nThe code doesn't really need POLLNVAL (Its just there for \"can't happen\"\ncase). POLLOUT is needed. I looked at poll emulation code: It returning\nEINVAL causes transfer loop to fail quick.\n\nI think its possible to write the loop in terms of select instead of poll.\nWould this be better for Git on Windows?\n\n-Ilari\n"},{"id":"148095","messageId":"201008142031.46759.j6t@kdbg.org","threadId":"24735","inReplyTo":"20100814093801.GA28522@LK-Perkele-V2.elisa-laajakaista.fi","subject":"Re: [PATCH il/rfc-remote-fd-ext] Fix build on Windows","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2010-08-14T18:31:46Z","receivedAt":"2010-08-14T18:31:46Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Samstag, 14. August 2010, Ilari Liusvaara wrote:\n> The code doesn't really need POLLNVAL (Its just there for \"can't happen\"\n> case). POLLOUT is needed. I looked at poll emulation code: It returning\n> EINVAL causes transfer loop to fail quick.\n>\n> I think its possible to write the loop in terms of select instead of poll.\n> Would this be better for Git on Windows?\n\nNo. select does not work with pipes on Windows.\n\n-- Hannes\n"}]}