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

Re: [PATCH v2] mingw: simplify PATH handling

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 22, 2017, 12:58 UTC
Message-ID
<alpine.DEB.2.21.1.1705221457520.3610@virtualbox>
In-Reply-To
<f4119dba-0e25-0a0b-0796-dc4c3d4d1cc5@web.de>
Hi René,
On Sat, 20 May 2017, René Scharfe wrote:
Show 12 quoted lines
> On Windows the environment variable PATH contains a semicolon-separated
> list of directories to search for, in order, when looking for the
> location of a binary to run.  get_path_split() parses it and returns an
> array of string copies, which is iterated by path_lookup(), which in
> turn passes each entry to lookup_prog().
> 
> Change lookup_prog() to take the directory name as a length-limited
> string instead of as a NUL-terminated one and parse PATH directly in
> path_lookup().  This avoids memory allocations, simplifying the code.
> 
> Helped-by: Johannes Sixt <j6t@kdbg.org>
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
ACK.
> Rebased against Junio's master, fixed string overrun.  Can hold and
> resubmit in a few months if it gets in the way right now.
I am in favor of getting this in as soon as possible.

Ciao, Dscho

Previous: René Scharfe
Message 5 of 5 in “mingw: simplify PATH handling”
  1. mingw: simplify PATH handlingRené Scharfe, May 20, 2017
  2. Johannes SixtMay 20, 2017
  3. René ScharfeMay 20, 2017
  4. mingw: simplify PATH handlingRené Scharfe, May 20, 2017
  5. Johannes SchindelinMay 22, 2017

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.