(fhandler_base::lseek): Include high order bits in return.
Christopher Faylor
cgf@redhat.com
Tue Nov 25 09:32:00 GMT 2003
The patch below causes compile warnings to be issued for cygwin when
stat.h is included:
In file included from /netrel/generic/cygwin/newlib/libc/include/sys/fcntl.h:164,
from /netrel/generic/cygwin/winsup/cygwin/include/fcntl.h:14,
from /netrel/generic/cygwin/winsup/testsuite/winsup.api/crlf.c:144:
/netrel/generic/cygwin/newlib/libc/include/sys/stat.h:144: warning: `struct stat64' declared inside parameter list
/netrel/generic/cygwin/newlib/libc/include/sys/stat.h:144: warning: its scope is only this definition or declaration, which is probably not what you want
It could presumably cause errors for unistd.h/_lseek64 as well.
I noticed this problem while trying to run the cygwin test suite.
cgf
On Tue, Nov 18, 2003 at 02:36:45PM +0100, Corinna Vinschen wrote:
> * libc/include/sys/fcntl.h: Declare _open64.
> * libc/include/sys/stat.h: Declare _fstat64.
> * libc/include/sys/unistd.h: Declare _lseek64.
>
>Index: libc/include/sys/fcntl.h
>===================================================================
>RCS file: /cvs/src/src/newlib/libc/include/sys/fcntl.h,v
>retrieving revision 1.2
>diff -u -p -r1.2 fcntl.h
>--- libc/include/sys/fcntl.h 5 Sep 2000 18:29:53 -0000 1.2
>+++ libc/include/sys/fcntl.h 18 Nov 2003 12:49:47 -0000
>@@ -171,6 +171,9 @@ extern int fcntl _PARAMS ((int, int, ...
> of newlib. */
> extern int _open _PARAMS ((const char *, int, ...));
> extern int _fcntl _PARAMS ((int, int, ...));
>+#ifdef __LARGE64_FILES
>+extern int _open64 _PARAMS ((const char *, int, ...));
>+#endif
>
> #ifdef __cplusplus
> }
>Index: libc/include/sys/stat.h
>===================================================================
>RCS file: /cvs/src/src/newlib/libc/include/sys/stat.h,v
>retrieving revision 1.13
>diff -u -p -r1.13 stat.h
>--- libc/include/sys/stat.h 26 Aug 2003 20:54:04 -0000 1.13
>+++ libc/include/sys/stat.h 18 Nov 2003 12:49:48 -0000
>@@ -140,6 +140,9 @@ int _EXFUN(mknod,( const char *__path, m
> #ifndef __INSIDE_CYGWIN__
> int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ));
> int _EXFUN(_stat,( const char *__path, struct stat *__sbuf ));
>+#ifdef __LARGE64_FILES
>+int _EXFUN(_fstat64,( int __fd, struct stat64 *__sbuf ));
>+#endif
> #endif
>
> #endif /* !_STAT_H_ */
>Index: libc/include/sys/unistd.h
>===================================================================
>RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
>retrieving revision 1.45
>diff -u -p -r1.45 unistd.h
>--- libc/include/sys/unistd.h 10 Sep 2003 15:53:44 -0000 1.45
>+++ libc/include/sys/unistd.h 18 Nov 2003 12:49:48 -0000
>@@ -177,6 +177,9 @@ void * _EXFUN(_sbrk, (ptrdiff_t __incr
> int _EXFUN(_unlink, (const char *__path ));
> _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte ));
> int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
>+#ifdef __LARGE64_FILES
>+_off64_t _EXFUN(_lseek64, (int, _off64_t, int));
>+#endif
>
> #if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__)
> #if !defined(__INSIDE_CYGWIN__)
>
>--
>Corinna Vinschen
>Cygwin Developer
>Red Hat, Inc.
More information about the Newlib
mailing list