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

Re: [PATCH] Replace hard-coded path with one from <paths.h>

From
TTait <git.git@t41t.com>
Date
Apr 9, 2010, 23:54 UTC
Message-ID
<20100409235455.GI2480@ece.pdx.edu>
In-Reply-To
<20100408105850.GD2146@arachsys.com>
Show 9 quoted lines
> > > +#include <paths.h>
> >
> > This breaks on Windows due to missing paths.h. I guess you need some
> > guard to detect if the header is present or not.
>
> Is this true of all WIN32, or just __MINGW32__ / __CYGWIN__? Presumably
> /usr/local/bin:/usr/bin:/bin is the wrong default PATH on windows too, so
> perhaps I should sort that at the same point---what would a canonical
> default PATH be for Windows?
Paths.h is not found on my version of mingw/msys.
The "canonical" Windows path is usually the system directory, and system32
and system32\Wbem under the system directory. The system directory could
be anywhere. C:\WINDOWS is common, but the WINDOWS (or even the C:) are
subject to change on any given installation. So for example on my computer,
	C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

is the path before adding in PowerShell, Resource Kits, GTK, etc. Windows also assumes '.' is part of your path, even though it's not explicitly present in %PATH%.

My version of mingw seems to prepend to the above,
	.:/usr/local/bin:/mingw/bin:/bin
besides also using : instead of ; as a separator.
Previous: Chris WebbNext: Chris Webb
Message 23 of 24 in “Replace hard-coded path with one configurable at make time”
  1. Replace hard-coded path with one configurable at make timeChris Webb, Apr 4, 2010
  2. Junio C HamanoApr 4, 2010
  3. Chris WebbApr 4, 2010
  4. Chris WebbApr 6, 2010
  5. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 6, 2010
  6. Erik Faye-LundApr 7, 2010
  7. Chris WebbApr 8, 2010
  8. Erik Faye-LundApr 8, 2010
  9. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 8, 2010
  10. Erik Faye-LundApr 8, 2010
  11. Chris WebbApr 9, 2010
  12. Chris WebbApr 13, 2010
  13. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 13, 2010
  14. Junio C HamanoApr 13, 2010
  15. Chris WebbApr 14, 2010
  16. Jakub NarebskiApr 15, 2010
  17. Junio C HamanoApr 15, 2010
  18. Jakub NarebskiApr 15, 2010
  19. Chris WebbApr 15, 2010
  20. Jakub NarebskiApr 15, 2010
  21. Chris WebbApr 15, 2010
  22. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 15, 2010
  23. TaitApr 9, 2010
  24. git-instaweb: pass through invoking user's path to gitweb CGI scriptChris Webb, Apr 6, 2010

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.