Skip to content

Commit

Permalink
Merge branch 'develop' into feature/fix-cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
syclik committed Mar 8, 2014
2 parents 8752fad + 78f485f commit 70c599c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/test/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ int count_matches(const std::string& target,
* @return '\' for Windows, '/' otherwise.
*/
char get_path_separator() {
static char path_separator = 0;
if (path_separator == 0) {
FILE *in;
if(!(in = popen("make path_separator --no-print-directory", "r")))
throw std::runtime_error("\"make path_separator\" has failed.");
path_separator = fgetc(in);
pclose(in);
}
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
static char path_separator = '\\';
#else
static char path_separator = '/';
#endif
return path_separator;
}

Expand Down

0 comments on commit 70c599c

Please sign in to comment.