Re: [PATCH] Replace hard-coded path with one from <paths.h>
- From
- Tait <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.