]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove now mostly superfluous DIR_DELIM_CH macro
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 6 Jul 2021 06:44:25 +0000 (08:44 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 6 Jul 2021 20:19:43 +0000 (22:19 +0200)
src/system.hpp
unittest/test_Util.cpp

index 191f5e30ad31e235e6f0421a58d29ca3131663ed..424891f7e4b618c8e94dfec7697b895a26da3178 100644 (file)
@@ -174,11 +174,9 @@ const mode_t S_IWUSR = mode_t(_S_IWRITE);
 #  define STDIN_FILENO 0
 #  define STDOUT_FILENO 1
 #  define STDERR_FILENO 2
-#  define DIR_DELIM_CH '\\'
 #  define PATH_DELIM ";"
 #else
 #  define DLLIMPORT
-#  define DIR_DELIM_CH '/'
 #  define PATH_DELIM ":"
 #endif
 
index a96e64456b90f45527c713e5667166f7369680c5..4720c8ba54146cd201b08ce6490f6ebd8df262da 100644 (file)
@@ -354,8 +354,8 @@ TEST_CASE("Util::get_extension")
 static inline std::string
 os_path(std::string path)
 {
-#if !defined(HAVE_DIRENT_H) && DIR_DELIM_CH != '/'
-  std::replace(path.begin(), path.end(), '/', DIR_DELIM_CH);
+#if defined(_WIN32) && !defined(HAVE_DIRENT_H)
+  std::replace(path.begin(), path.end(), '/', '\\');
 #endif
 
   return path;