From a5b4a61c7cb0a655de4b0598dad1ded76d8c9c16 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 28 Dec 2005 12:34:45 -0500 Subject: ENH: Fix building on cygwin --- Utilities/cmtar/libtar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index b0cc2d4..7454a5c 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -15,7 +15,7 @@ #include #include #include -#ifdef _MSC_VER +#if !defined(_WIN32) || defined(__CYGWIN__) #include #include #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) { -- cgit v0.12