diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2003-05-12 11:09:39 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2003-05-12 11:09:39 +0000 |
commit | 11e3a52072b7ccc02ddbf518ea70a3d8a0909069 (patch) | |
tree | 0ea9a65302d2bfe65a79c0f2b09613a9d6292880 /newlib/libc/stdio | |
parent | 194d9eb318403b1618c3f77eba6de4e17b7c900d (diff) | |
download | newlib-11e3a52072b7ccc02ddbf518ea70a3d8a0909069.zip newlib-11e3a52072b7ccc02ddbf518ea70a3d8a0909069.tar.gz newlib-11e3a52072b7ccc02ddbf518ea70a3d8a0909069.tar.bz2 |
* configure.host: Accomodate removing the libc/sys/cygwin dir.
* libc/locale/ldpart.c (__part_load_locale): Use 64 bit stat call
if __CYGWIN_USE_BIG_TYPES__ is set.
* libc/search/hash.c (__hash_open): Ditto.
(init_hash): Ditto.
* libc/stdio/fseek.c (fseek): Ditto.
* libc/stdio/makebuf.c (__smakebuf): Ditto.
* libc/stdio/mktemp.c (_gettemp): Ditto.
* libc/sys/cygwin/Makefile.am: Remove.
* libc/sys/cygwin/Makefile.in: Remove.
* libc/sys/cygwin/aclocal.m4: Remove.
* libc/sys/cygwin/configure: Remove.
* libc/sys/cygwin/configure.in: Remove.
* libc/sys/cygwin/crt0.c: Move to winsup/cygwin directory.
* libc/sys/cygwin/sys/dirent.h: Move to winsup/cygwin/include/sys
directory.
* libc/sys/cygwin/sys/param.h: Ditto.
* libc/sys/cygwin/sys/utime.h: Ditto.
* libc/sys/cygwin/sys/utmp.h: Ditto.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/fseek.c | 8 | ||||
-rw-r--r-- | newlib/libc/stdio/makebuf.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio/mktemp.c | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c index 0694578..f37393c 100644 --- a/newlib/libc/stdio/fseek.c +++ b/newlib/libc/stdio/fseek.c @@ -198,7 +198,11 @@ fseek (fp, offset, whence) { if (seekfn != __sseek || fp->_file < 0 +#ifdef __CYGWIN_USE_BIG_TYPES__ + || _fstat64_r (ptr, fp->_file, &st) +#else || _fstat_r (ptr, fp->_file, &st) +#endif || (st.st_mode & S_IFMT) != S_IFREG) { fp->_flags |= __SNPT; @@ -221,7 +225,11 @@ fseek (fp, offset, whence) target = offset; else { +#ifdef __CYGWIN_USE_BIG_TYPES__ + if (_fstat64_r (ptr, fp->_file, &st)) +#else if (_fstat_r (ptr, fp->_file, &st)) +#endif goto dumb; target = st.st_size + offset; } diff --git a/newlib/libc/stdio/makebuf.c b/newlib/libc/stdio/makebuf.c index 4a09c4d..afb1e2d 100644 --- a/newlib/libc/stdio/makebuf.c +++ b/newlib/libc/stdio/makebuf.c @@ -47,7 +47,11 @@ __smakebuf (fp) fp->_bf._size = 1; return; } +#ifdef __CYGWIN_USE_BIG_TYPES__ + if (fp->_file < 0 || _fstat64_r (fp->_data, fp->_file, &st) < 0) +#else if (fp->_file < 0 || _fstat_r (fp->_data, fp->_file, &st) < 0) +#endif { couldbetty = 0; size = BUFSIZ; diff --git a/newlib/libc/stdio/mktemp.c b/newlib/libc/stdio/mktemp.c index f3eaa09..24bbf67 100644 --- a/newlib/libc/stdio/mktemp.c +++ b/newlib/libc/stdio/mktemp.c @@ -132,7 +132,11 @@ _DEFUN (_gettemp, (ptr, path, doopen), if (*trv == '/') { *trv = '\0'; +#ifdef __CYGWIN_USE_BIG_TYPES__ + if (_stat64_r (ptr, path, &sbuf)) +#else if (_stat_r (ptr, path, &sbuf)) +#endif return (0); if (!(sbuf.st_mode & S_IFDIR)) { @@ -158,7 +162,11 @@ _DEFUN (_gettemp, (ptr, path, doopen), #endif return 0; } +#ifdef __CYGWIN_USE_BIG_TYPES__ + else if (_stat64_r (ptr, path, &sbuf)) +#else else if (_stat_r (ptr, path, &sbuf)) +#endif return (ptr->_errno == ENOENT ? 1 : 0); /* tricky little algorithm for backward compatibility */ |