diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-12-28 12:34:45 -0500 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-12-28 12:34:45 -0500 |
commit | a5b4a61c7cb0a655de4b0598dad1ded76d8c9c16 (patch) | |
tree | 95e09e8b7a171941c2843347fa6da5aa37e5783c /Utilities | |
parent | e1ca8321ed9bac8799ad34ca064d468599b67078 (diff) | |
download | cmake-a5b4a61c7cb0a655de4b0598dad1ded76d8c9c16.tar.gz |
ENH: Fix building on cygwin
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmtar/libtar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index b0cc2d468b..7454a5c03c 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -15,7 +15,7 @@ #include <stdio.h> #include <fcntl.h> #include <errno.h> -#ifdef _MSC_VER +#if !defined(_WIN32) || defined(__CYGWIN__) #include <libtar/compat.h> #include <io.h> #else @@ -86,7 +86,7 @@ gzopen_frontend(char *pathname, int oflags, int mode) if (fd == -1) return -1; -#ifndef _MSC_VER +#if !defined(_WIN32) || defined(__CYGWIN__) if ((oflags & O_CREAT) && fchmod(fd, mode)) return -1; #endif @@ -291,12 +291,12 @@ main(int argc, char *argv[]) int c; int mode = 0; libtar_list_t *l; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) int optind; #endif progname = basename(argv[0]); -#ifndef _WIN32 +#if !defined(_WIN32) || defined(__CYGWIN__) while ((c = getopt(argc, argv, "cC:gtvVxz")) != -1) switch (c) { |