{"thread":{"id":"19443","subject":"[PATCH 0/5] A few minor MinGW changes","startedAt":"2009-05-23T08:04:46Z","lastAt":"2009-05-23T08:04:51Z","messageCount":6,"participants":["Steffen Prohaska"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"114497","messageId":"1243065891-13270-1-git-send-email-prohaska@zib.de","threadId":"19443","inReplyTo":null,"subject":"[PATCH 0/5] A few minor MinGW changes","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2009-05-23T08:04:46Z","receivedAt":"2009-05-23T08:04:46Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"Here are a few simple commits that are included in the msysgit\nrelease but not in git.git.\n\n        Steffen\n\nJohannes Schindelin (4):\n  MinGW: the path separator to split GITPERLLIB is ';' on Win32\n  MinGW: use POSIX signature of waitpid()\n  MinGW: Add a simple getpass()\n  MinGW: Fix compiler warning in merge-recursive\n\nPeter Harris (1):\n  MinGW: Scan for \\r in addition to \\n when reading shbang lines\n\n Makefile                  |    4 +++-\n builtin-merge-recursive.c |    5 +++--\n compat/mingw.c            |   19 +++++++++++++++++--\n compat/mingw.h            |    4 +++-\n 4 files changed, 26 insertions(+), 6 deletions(-)\n"},{"id":"114498","messageId":"1243065891-13270-2-git-send-email-prohaska@zib.de","threadId":"19443","inReplyTo":"1243065891-13270-1-git-send-email-prohaska@zib.de","subject":"[PATCH 1/5] MinGW: Scan for \\r in addition to \\n when reading shbang lines","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2009-05-23T08:04:47Z","receivedAt":"2009-05-23T08:04:47Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"From: Peter Harris <git@peter.is-a-geek.org>\n\n\\r is common on Windows, so we should handle it gracefully.\n\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n compat/mingw.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex cdeda1d..b723c4d 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -525,8 +525,8 @@ static const char *parse_interpreter(const char *cmd)\n \tif (buf[0] != '#' || buf[1] != '!')\n \t\treturn NULL;\n \tbuf[n] = '\\0';\n-\tp = strchr(buf, '\\n');\n-\tif (!p)\n+\tp = buf + strcspn(buf, \"\\r\\n\");\n+\tif (!*p)\n \t\treturn NULL;\n \n \t*p = '\\0';\n-- \n1.6.3.1.54.g99dd\n"},{"id":"114500","messageId":"1243065891-13270-3-git-send-email-prohaska@zib.de","threadId":"19443","inReplyTo":"1243065891-13270-2-git-send-email-prohaska@zib.de","subject":"[PATCH 2/5] MinGW: the path separator to split GITPERLLIB is ';' on Win32","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2009-05-23T08:04:48Z","receivedAt":"2009-05-23T08:04:48Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n Makefile |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 26d180c..7166760 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -225,6 +225,7 @@ ETC_GITCONFIG = etc/gitconfig\n endif\n lib = lib\n # DESTDIR=\n+pathsep = :\n \n # default configuration for gitweb\n GITWEB_CONFIG = gitweb_config.perl\n@@ -813,6 +814,7 @@ ifneq (,$(findstring CYGWIN,$(uname_S)))\n \tUNRELIABLE_FSTAT = UnfortunatelyYes\n endif\n ifneq (,$(findstring MINGW,$(uname_S)))\n+\tpathsep = ;\n \tNO_PREAD = YesPlease\n \tNO_OPENSSL = YesPlease\n \tNO_CURL = YesPlease\n@@ -1268,7 +1270,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl\n \tsed -e '1{' \\\n \t    -e '\ts|#!.*perl|#!$(PERL_PATH_SQ)|' \\\n \t    -e '\th' \\\n-\t    -e '\ts=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || \"@@INSTLIBDIR@@\"));=' \\\n+\t    -e '\ts=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || \"@@INSTLIBDIR@@\"));=' \\\n \t    -e '\tH' \\\n \t    -e '\tx' \\\n \t    -e '}' \\\n-- \n1.6.3.1.54.g99dd\n"},{"id":"114502","messageId":"1243065891-13270-4-git-send-email-prohaska@zib.de","threadId":"19443","inReplyTo":"1243065891-13270-3-git-send-email-prohaska@zib.de","subject":"[PATCH 3/5] MinGW: use POSIX signature of waitpid()","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2009-05-23T08:04:49Z","receivedAt":"2009-05-23T08:04:49Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGit's source code expects waitpid() to return a signed int status.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n compat/mingw.h |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 762eb14..b1156b8 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -109,7 +109,7 @@ static inline int mingw_unlink(const char *pathname)\n }\n #define unlink mingw_unlink\n \n-static inline int waitpid(pid_t pid, unsigned *status, unsigned options)\n+static inline int waitpid(pid_t pid, int *status, unsigned options)\n {\n \tif (options == 0)\n \t\treturn _cwait(status, pid, 0);\n-- \n1.6.3.1.54.g99dd\n"},{"id":"114501","messageId":"1243065891-13270-5-git-send-email-prohaska@zib.de","threadId":"19443","inReplyTo":"1243065891-13270-4-git-send-email-prohaska@zib.de","subject":"[PATCH 4/5] MinGW: Add a simple getpass()","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2009-05-23T08:04:50Z","receivedAt":"2009-05-23T08:04:50Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWe need getpass() to activate curl on MinGW.  Although the default\nMakefile currently has 'NO_CURL = YesPlease', msysgit releases do\nprovide curl support, so getpass() is used.\n\n[spr: - edited commit message.\n      - squashed commit that provides getpass() declaration.]\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n compat/mingw.c |   15 +++++++++++++++\n compat/mingw.h |    2 ++\n 2 files changed, 17 insertions(+), 0 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex b723c4d..e190fdd 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1156,3 +1156,18 @@ int link(const char *oldpath, const char *newpath)\n \t}\n \treturn 0;\n }\n+\n+char *getpass(const char *prompt)\n+{\n+\tstruct strbuf buf = STRBUF_INIT;\n+\n+\tfputs(prompt, stderr);\n+\tfor (;;) {\n+\t\tchar c = _getch();\n+\t\tif (c == '\\r' || c == '\\n')\n+\t\t\tbreak;\n+\t\tstrbuf_addch(&buf, c);\n+\t}\n+\tfputs(\"\\n\", stderr);\n+\treturn strbuf_detach(&buf, NULL);\n+}\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex b1156b8..4c50f5b 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -38,6 +38,8 @@ struct passwd {\n \tchar *pw_dir;\n };\n \n+extern char *getpass(const char *prompt);\n+\n struct pollfd {\n \tint fd;           /* file descriptor */\n \tshort events;     /* requested events */\n-- \n1.6.3.1.54.g99dd\n"},{"id":"114499","messageId":"1243065891-13270-6-git-send-email-prohaska@zib.de","threadId":"19443","inReplyTo":"1243065891-13270-5-git-send-email-prohaska@zib.de","subject":"[PATCH 5/5] MinGW: Fix compiler warning in merge-recursive","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2009-05-23T08:04:51Z","receivedAt":"2009-05-23T08:04:51Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nGCC 4.4.0 on Windows does not like the format %zu.  It is quite unlikely,\nthough, that we need more merge bases than a %d can display, so replace\nthe %zu by a %d.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n builtin-merge-recursive.c |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-merge-recursive.c b/builtin-merge-recursive.c\nindex 703045b..d26a96e 100644\n--- a/builtin-merge-recursive.c\n+++ b/builtin-merge-recursive.c\n@@ -45,8 +45,9 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix)\n \t\t\tbases[bases_count++] = sha;\n \t\t}\n \t\telse\n-\t\t\twarning(\"Cannot handle more than %zu bases. \"\n-\t\t\t\t\"Ignoring %s.\", ARRAY_SIZE(bases)-1, argv[i]);\n+\t\t\twarning(\"Cannot handle more than %d bases. \"\n+\t\t\t\t\"Ignoring %s.\",\n+\t\t\t\t(int)ARRAY_SIZE(bases)-1, argv[i]);\n \t}\n \tif (argc - i != 3) /* \"--\" \"<head>\" \"<remote>\" */\n \t\tdie(\"Not handling anything other than two heads merge.\");\n-- \n1.6.3.1.54.g99dd\n"}]}