summaryrefslogtreecommitdiff
path: root/test-chmtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-chmtime.c')
-rw-r--r--test-chmtime.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test-chmtime.c b/test-chmtime.c
index 02b42badd5..0df748784b 100644
--- a/test-chmtime.c
+++ b/test-chmtime.c
@@ -56,7 +56,7 @@ static int timespec_arg(const char *arg, long int *set_time, int *set_eq)
return 1;
}
-int main(int argc, const char *argv[])
+int main(int argc, char *argv[])
{
static int verbose;
@@ -84,15 +84,15 @@ int main(int argc, const char *argv[])
if (stat(argv[i], &sb) < 0) {
fprintf(stderr, "Failed to stat %s: %s\n",
argv[i], strerror(errno));
- return -1;
+ return 1;
}
-#ifdef WIN32
+#ifdef GIT_WINDOWS_NATIVE
if (!(sb.st_mode & S_IWUSR) &&
chmod(argv[i], sb.st_mode | S_IWUSR)) {
fprintf(stderr, "Could not make user-writable %s: %s",
argv[i], strerror(errno));
- return -1;
+ return 1;
}
#endif
@@ -107,7 +107,7 @@ int main(int argc, const char *argv[])
if (utb.modtime != sb.st_mtime && utime(argv[i], &utb) < 0) {
fprintf(stderr, "Failed to modify time on %s: %s\n",
argv[i], strerror(errno));
- return -1;
+ return 1;
}
}
@@ -115,5 +115,5 @@ int main(int argc, const char *argv[])
usage:
fprintf(stderr, "usage: %s %s\n", argv[0], usage_str);
- return -1;
+ return 1;
}