]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix make test on win32
authorRamiro Polla <ramiro.polla@gmail.com>
Wed, 22 Sep 2010 01:16:42 +0000 (22:16 -0300)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 26 Sep 2010 20:11:45 +0000 (22:11 +0200)
test/main.c
test/util.c

index 739d45255eadc8235b22532013c7923860d2843f..82f96699cd914be88196790b1e0b0aa4a7d2abd4 100644 (file)
@@ -55,6 +55,10 @@ main(int argc, char **argv)
        char *testdir, *dir_before;
        int result;
 
+#ifdef _WIN32
+       putenv("CCACHE_DETECT_SHEBANG=1");
+#endif
+
        while ((c = getopt_long(argc, argv, "hv", options, NULL)) != -1) {
                switch (c) {
                case 'h':
index 9196d6214b0c79fc42f90d7e1956aed2f79b1074..14a858fd1ca3090ebc6d9301030faf7567dc41ab 100644 (file)
 #include "system.h"
 #include "test/util.h"
 
+#ifdef _WIN32
+#    define lstat(a,b) stat(a,b)
+#endif
+
 bool
 path_exists(const char *path)
 {
@@ -29,8 +33,13 @@ path_exists(const char *path)
 bool
 is_symlink(const char *path)
 {
+#ifdef _WIN32
+       (void) path;
+       return 0;
+#else
        struct stat st;
        return lstat(path, &st) == 0 && S_ISLNK(st.st_mode);
+#endif
 }
 
 void