From: Ramiro Polla Date: Wed, 22 Sep 2010 01:16:42 +0000 (-0300) Subject: Fix make test on win32 X-Git-Tag: v3.2~318 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=419ec564c37820f4e8ddc45d331b11cb80460b73;p=thirdparty%2Fccache.git Fix make test on win32 --- diff --git a/test/main.c b/test/main.c index 739d45255..82f96699c 100644 --- a/test/main.c +++ b/test/main.c @@ -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': diff --git a/test/util.c b/test/util.c index 9196d6214..14a858fd1 100644 --- a/test/util.c +++ b/test/util.c @@ -19,6 +19,10 @@ #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