summaryrefslogtreecommitdiffstats
path: root/Utilities/cmtar
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-29 16:42:31 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-29 16:42:31 (GMT)
commit6946eb209a58fce78c69fb5c799cefce4f32648c (patch)
treeebf522a1a81252ab3546916d77857c96e2f88017 /Utilities/cmtar
parentc5e532d07dd4e820be2a81b07e12629690425027 (diff)
downloadCMake-6946eb209a58fce78c69fb5c799cefce4f32648c.zip
CMake-6946eb209a58fce78c69fb5c799cefce4f32648c.tar.gz
CMake-6946eb209a58fce78c69fb5c799cefce4f32648c.tar.bz2
BUG: Fix on cygwin... again?
Diffstat (limited to 'Utilities/cmtar')
-rw-r--r--Utilities/cmtar/append.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Utilities/cmtar/append.c b/Utilities/cmtar/append.c
index 34434a5..be249ed 100644
--- a/Utilities/cmtar/append.c
+++ b/Utilities/cmtar/append.c
@@ -234,7 +234,7 @@ tar_append_regfile(TAR *t, char *realname)
int i, j;
size_t size;
-#ifdef _WIN32
+#if defined( _WIN32 ) || defined(__CYGWIN__)
filefd = open(realname, O_RDONLY | O_BINARY);
#else
filefd = open(realname, O_RDONLY);
@@ -254,7 +254,11 @@ tar_append_regfile(TAR *t, char *realname)
if (j != T_BLOCKSIZE)
{
if (j != -1)
+ {
+ fprintf(stderr, "Unexpected size of read data: %d <> %d for file: %s\n",
+ j, T_BLOCKSIZE, realname);
errno = EINVAL;
+ }
return -1;
}
if (tar_block_write(t, &block) == -1)