git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] compat/mingw: brown paper bag fix for 50a6c8e

From
Torsten Bögershausen <tboegi@web.de>
Date
Feb 29, 2016, 09:56 UTC
Message-ID
<56D415C6.2040203@web.de>
In-Reply-To
<20160229092816.GA23910@sigill.intra.peff.net>
Thanks for the fast-patch.
I manually copied the patch, But there are more probles, it seems.
$ git diff
diff --git a/compat/mingw.c b/compat/mingw.c
index cfedcf9..b1163f2 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1069,7 +1069,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char 
**argv, char **deltaen
                         free(quoted);
         }

-       wargs = xmalloc_array(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
+       wargs = ALLOC_ARRAY(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
         xutftowcs(wargs, args.buf, 2 * args.len + 1);
         strbuf_release(&args);


tb@torbogwm MINGW64 ~/Users/tb/projects/git/tb ((2273582...))
$ make
     CC compat/mingw.o
In file included from compat/mingw.c:1:0:
compat/mingw.c: In function 'mingw_spawnve_fd':
compat/../git-compat-util.h:769:60: error: invalid type argument of unary '*' 
(have 'size_t {aka long long unsigned int}')
  #define ALLOC_ARRAY(x, alloc) (x) = xmalloc(st_mult(sizeof(*(x)), (alloc)))
                                                             ^
compat/mingw.c:1072:10: note: in expansion of macro 'ALLOC_ARRAY'
   wargs = ALLOC_ARRAY(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
           ^
Makefile:1948: recipe for target 'compat/mingw.o' failed
make: *** [compat/mingw.o] Error 1
Previous: Jeff KingNext: Jeff King
Message 3 of 18 in “50a6c8ef - xmalloc_array”
  1. Torsten BögershausenFeb 29, 2016
  2. compat/mingw: brown paper bag fix for 50a6c8eJeff King, Feb 29, 2016
  3. Torsten BögershausenFeb 29, 2016
  4. Jeff KingFeb 29, 2016
  5. Compiler warning under cygwin/mingw (was: fix for 50a6c8e)Torsten Bögershausen, Feb 29, 2016
  6. Jeff KingFeb 29, 2016
  7. SZEDER GáborFeb 29, 2016
  8. Junio C HamanoApr 12, 2016
  9. Junio C HamanoMay 10, 2016
  10. Ramsay JonesFeb 29, 2016
  11. Ramsay JonesMar 3, 2016
  12. Ramsay JonesMar 3, 2016
  13. Junio C HamanoFeb 29, 2016
  14. Jeff KingFeb 29, 2016
  15. Torsten BögershausenMar 1, 2016
  16. Jeff KingMar 1, 2016
  17. Johannes SchindelinMar 1, 2016
  18. Johannes SchindelinFeb 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.