BUG: Fix on cygwin... again?

This commit is contained in:
Andy Cedilnik 2005-12-29 11:42:31 -05:00
parent c5e532d07d
commit 6946eb209a
1 changed files with 5 additions and 1 deletions

View File

@ -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)