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

From: Tait <[email-masked]>
Date: Fri, 9 Apr 2010 16:54:55 -0700

> > > +#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.