From 48a27980be4152b88225d9e5696c4e0a6df1defd Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Sun, 15 Aug 2004 11:28:09 +0000 Subject: * mingwex/fopen64.c: Move. * mingwex/fseeko64.c: Move. * mingwex/ftello64.c: Move. * mingwex/lseek64.c: Move. * mingwex/stdio/fopen64.c: To here. * mingwex/stdio/fseeko64.c: To here. * mingwex/stdio/ftello64.c: To here. * mingwex/stdio/lseek64.c: To here. White space cleanup in ChangeLog --- winsup/mingw/ChangeLog | 29 ++++++++++++++++++++--------- winsup/mingw/mingwex/fopen64.c | 7 ------- winsup/mingw/mingwex/fseeko64.c | 27 --------------------------- winsup/mingw/mingwex/ftello64.c | 11 ----------- winsup/mingw/mingwex/lseek64.c | 8 -------- winsup/mingw/mingwex/stdio/fopen64.c | 7 +++++++ winsup/mingw/mingwex/stdio/fseeko64.c | 27 +++++++++++++++++++++++++++ winsup/mingw/mingwex/stdio/ftello64.c | 11 +++++++++++ winsup/mingw/mingwex/stdio/lseek64.c | 8 ++++++++ 9 files changed, 73 insertions(+), 62 deletions(-) delete mode 100644 winsup/mingw/mingwex/fopen64.c delete mode 100644 winsup/mingw/mingwex/fseeko64.c delete mode 100644 winsup/mingw/mingwex/ftello64.c delete mode 100644 winsup/mingw/mingwex/lseek64.c create mode 100755 winsup/mingw/mingwex/stdio/fopen64.c create mode 100755 winsup/mingw/mingwex/stdio/fseeko64.c create mode 100755 winsup/mingw/mingwex/stdio/ftello64.c create mode 100755 winsup/mingw/mingwex/stdio/lseek64.c (limited to 'winsup/mingw') diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 638bdc8..92575d5 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,5 +1,16 @@ 2004-08-15 Danny Smith + * mingwex/fopen64.c: Move. + * mingwex/fseeko64.c: Move. + * mingwex/ftello64.c: Move. + * mingwex/lseek64.c: Move. + * mingwex/stdio/fopen64.c: To here. + * mingwex/stdio/fseeko64.c: To here. + * mingwex/stdio/ftello64.c: To here. + * mingwex/stdio/lseek64.c: To here. + +2004-08-15 Danny Smith + * profile/gmon.c [__MINGW32__]: Include string.h for memset prototype. @@ -21,7 +32,7 @@ * include/string.h (memchr, memcmp, strchr, strcmp, strcspn) (strlen, strncmp, strpbrk, strrchr, strspn, strstr): Add pure - attribute. + attribute. 2004-07-30 Danny Smith @@ -183,7 +194,7 @@ (__mingw_fwrite): Handle huge files. 2004-06-30 Kees Zeelenberg - Danny Smith + Danny Smith * include/stdio.h (fopen64): Add inline function. (fseeko64): Add prototype. @@ -191,10 +202,10 @@ * include/io.h (lseek64): Add inline function. * include/sys/types (off64_t): Add typedef. (fpos64_t): Add typedef. - * mingwex/fopen64.c: New file. - * mingwex/fseeko64.c: New file. - * mingwex/ftello64.c: New file. - * mingwex/lseek64.c: New file. + * mingwex/fopen64.c: New file. + * mingwex/fseeko64.c: New file. + * mingwex/ftello64.c: New file. + * mingwex/lseek64.c: New file. * mingwex/Makefile.in (STDIO_DISTFILES): Add fopen64.c, fseeko.64.c, ftello64.c, lseek64.c. (STDIO_OBJS): Add fopen64.o, fseeko.64.o, ftello64.o, lseek64.o. @@ -1018,8 +1029,8 @@ 2002-10-30 Guido Serassio - * include/stdio.h (_getmaxstdio): Add prototype. - (_setmaxstdio): Likewise. + * include/stdio.h (_getmaxstdio): Add prototype. + (_setmaxstdio): Likewise. 2002-10-19 Kang Li @@ -1372,7 +1383,7 @@ * include/excpt.h (): Include windef.h not windows.h. * include/fcntl.h (_O_SHORT_LIVED): Add define. (_chmod): Add prototype. - (_creat): Correct prototype. + (_creat): Correct prototype. (SH_DENY*): Rename defines to _SH_DENY*. (SH_DENY*): Add Non-ANSI names for _SH_DENY*. include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG, diff --git a/winsup/mingw/mingwex/fopen64.c b/winsup/mingw/mingwex/fopen64.c deleted file mode 100644 index d1dca88..0000000 --- a/winsup/mingw/mingwex/fopen64.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -FILE* __cdecl -fopen64 (const char* filename, const char* mode) -{ - return fopen (filename, mode); -} diff --git a/winsup/mingw/mingwex/fseeko64.c b/winsup/mingw/mingwex/fseeko64.c deleted file mode 100644 index 94e17e9..0000000 --- a/winsup/mingw/mingwex/fseeko64.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include - -int __cdecl -fseeko64 (FILE* stream, off64_t offset, int whence) -{ - fpos_t pos; - if (whence == SEEK_CUR) - { - /* If stream is invalid, fgetpos sets errno. */ - if (fgetpos (stream, &pos)) - return (-1); - pos += (fpos_t) offset; - } - else if (whence == SEEK_END) - pos = (fpos_t) (_filelengthi64 (_fileno (stream)) + offset); - else if (whence == SEEK_SET) - pos = (fpos_t) offset; - else - { - errno = EINVAL; - return (-1); - } - return fsetpos (stream, &pos); -} - diff --git a/winsup/mingw/mingwex/ftello64.c b/winsup/mingw/mingwex/ftello64.c deleted file mode 100644 index 97a388c..0000000 --- a/winsup/mingw/mingwex/ftello64.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -off64_t __cdecl -ftello64 (FILE * stream) -{ - fpos_t pos; - if (fgetpos(stream, &pos)) - return -1LL; - else - return ((off64_t) pos); -} diff --git a/winsup/mingw/mingwex/lseek64.c b/winsup/mingw/mingwex/lseek64.c deleted file mode 100644 index 8f8bfa5..0000000 --- a/winsup/mingw/mingwex/lseek64.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -off64_t lseek64 -(int fd, off64_t offset, int whence) -{ - return _lseeki64(fd, (__int64) offset, whence); -} - diff --git a/winsup/mingw/mingwex/stdio/fopen64.c b/winsup/mingw/mingwex/stdio/fopen64.c new file mode 100755 index 0000000..d1dca88 --- /dev/null +++ b/winsup/mingw/mingwex/stdio/fopen64.c @@ -0,0 +1,7 @@ +#include + +FILE* __cdecl +fopen64 (const char* filename, const char* mode) +{ + return fopen (filename, mode); +} diff --git a/winsup/mingw/mingwex/stdio/fseeko64.c b/winsup/mingw/mingwex/stdio/fseeko64.c new file mode 100755 index 0000000..94e17e9 --- /dev/null +++ b/winsup/mingw/mingwex/stdio/fseeko64.c @@ -0,0 +1,27 @@ +#include +#include +#include + +int __cdecl +fseeko64 (FILE* stream, off64_t offset, int whence) +{ + fpos_t pos; + if (whence == SEEK_CUR) + { + /* If stream is invalid, fgetpos sets errno. */ + if (fgetpos (stream, &pos)) + return (-1); + pos += (fpos_t) offset; + } + else if (whence == SEEK_END) + pos = (fpos_t) (_filelengthi64 (_fileno (stream)) + offset); + else if (whence == SEEK_SET) + pos = (fpos_t) offset; + else + { + errno = EINVAL; + return (-1); + } + return fsetpos (stream, &pos); +} + diff --git a/winsup/mingw/mingwex/stdio/ftello64.c b/winsup/mingw/mingwex/stdio/ftello64.c new file mode 100755 index 0000000..97a388c --- /dev/null +++ b/winsup/mingw/mingwex/stdio/ftello64.c @@ -0,0 +1,11 @@ +#include + +off64_t __cdecl +ftello64 (FILE * stream) +{ + fpos_t pos; + if (fgetpos(stream, &pos)) + return -1LL; + else + return ((off64_t) pos); +} diff --git a/winsup/mingw/mingwex/stdio/lseek64.c b/winsup/mingw/mingwex/stdio/lseek64.c new file mode 100755 index 0000000..8f8bfa5 --- /dev/null +++ b/winsup/mingw/mingwex/stdio/lseek64.c @@ -0,0 +1,8 @@ +#include + +off64_t lseek64 +(int fd, off64_t offset, int whence) +{ + return _lseeki64(fd, (__int64) offset, whence); +} + -- cgit v1.1