Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sutcliffe <ir0nh34d@users.sourceforge.net>2011-05-23 06:54:21 +0400
committerChris Sutcliffe <ir0nh34d@users.sourceforge.net>2011-05-23 06:54:21 +0400
commit1e9f1055754a225a2a62a0b106b513ed3f3107be (patch)
tree63cca242a91050c2913628017a9e2de026e50e06 /winsup/mingw/mingwex
parent69080f58f04a0892b26e218d5cbb056da930a891 (diff)
2011-05-22 Antoine LECA <antoinel@users.sourceforge.net>
* mingwex/mingw-fseek.c: The anonymous union feature for LARGE_INTEGER is not always available, go the long way and use the explicit named union members, which are also declared in winnt.h.
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/mingw-fseek.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/mingw/mingwex/mingw-fseek.c b/winsup/mingw/mingwex/mingw-fseek.c
index b4f45cc7e..9a13957be 100644
--- a/winsup/mingw/mingwex/mingw-fseek.c
+++ b/winsup/mingw/mingwex/mingw-fseek.c
@@ -47,16 +47,16 @@ __mingw_fwrite (const void *buffer, size_t size, size_t count, FILE *fp)
LARGE_INTEGER current_position = {{0LL}};
__mingw_fseek_called = 0;
fflush (fp);
- actual_length.LowPart = GetFileSize ((HANDLE) _get_osfhandle (fileno (fp)),
- &actual_length.HighPart);
- if (actual_length.LowPart == 0xFFFFFFFF
+ actual_length.u.LowPart = GetFileSize ((HANDLE) _get_osfhandle (fileno (fp)),
+ &actual_length.u.HighPart);
+ if (actual_length.u.LowPart == 0xFFFFFFFF
&& GetLastError() != NO_ERROR )
return -1;
- current_position.LowPart = SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
- current_position.LowPart,
- &current_position.HighPart,
+ current_position.u.LowPart = SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
+ current_position.u.LowPart,
+ &current_position.u.HighPart,
FILE_CURRENT);
- if (current_position.LowPart == 0xFFFFFFFF
+ if (current_position.u.LowPart == 0xFFFFFFFF
&& GetLastError() != NO_ERROR )
return -1;
@@ -102,5 +102,5 @@ __mingw_fwrite (const void *buffer, size_t size, size_t count, FILE *fp)
FlushFileBuffers ((HANDLE) _get_osfhandle (fileno (fp)));
}
}
- return fwrite (buffer, size, count, fp);
+ return (fwrite) (buffer, size, count, fp);
}