namespace
{
+enum
+{
+#ifdef WIN32
+ ITEMSEP = ';'
+#else
+ ITEMSEP = ':'
+#endif
+};
+
/** Helper function to determine the location of the program's executable.
Caches the last result to cut down filesystem access with repeated calls. */
const Path &get_bin_dir(const string &argv0)
if(argv0.find('/')==string::npos)
{
const char *path = getenv("PATH");
- vector<string> dirs = split(path, ':');
+ vector<string> dirs = split(path, ITEMSEP);
for(vector<string>::const_iterator i=dirs.begin(); i!=dirs.end(); ++i)
if(exists(Path(*i)/argv0))
{