From efc428827bd2f9e254d08be2b7a24f65fac2731a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 6 Jul 2010 15:23:27 +0000 Subject: [PATCH] * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t. * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype. * libc/sys/linux/sys/dirent.h (_seekdir): Fix prototype to use long rather than off_t. --- newlib/ChangeLog | 7 +++++++ newlib/libc/posix/rewinddir.c | 2 +- newlib/libc/sys/linux/sys/dirent.h | 2 +- newlib/libc/sys/rtems/sys/dirent.h | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index d459e6d09..d1933e92e 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2010-07-06 Corinna Vinschen + + * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t. + * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype. + * libc/sys/linux/sys/dirent.h (_seekdir): Fix prototype to use long + rather than off_t. + 2010-07-01 Yaakov Selkowitz * libc/include/signal.h (sighandler_t): Add typedef. diff --git a/newlib/libc/posix/rewinddir.c b/newlib/libc/posix/rewinddir.c index bffad9612..f9ca9f7d4 100644 --- a/newlib/libc/posix/rewinddir.c +++ b/newlib/libc/posix/rewinddir.c @@ -48,7 +48,7 @@ _DEFUN(rewinddir, (dirp), #ifdef HAVE_DD_LOCK __lock_acquire_recursive(dirp->dd_lock); #endif - _seekdir((dirp), (off_t)0); + _seekdir((dirp), 0L); #ifdef HAVE_DD_LOCK __lock_release_recursive(dirp->dd_lock); #endif diff --git a/newlib/libc/sys/linux/sys/dirent.h b/newlib/libc/sys/linux/sys/dirent.h index 58d774594..ec8ed89d4 100644 --- a/newlib/libc/sys/linux/sys/dirent.h +++ b/newlib/libc/sys/linux/sys/dirent.h @@ -40,7 +40,7 @@ void rewinddir(DIR *); int closedir(DIR *); /* internal prototype */ -void _seekdir(DIR *dir,off_t offset); +void _seekdir(DIR *dir, long offset); DIR *_opendir(const char *); #ifndef _POSIX_SOURCE diff --git a/newlib/libc/sys/rtems/sys/dirent.h b/newlib/libc/sys/rtems/sys/dirent.h index fa3182824..9cd4f3657 100644 --- a/newlib/libc/sys/rtems/sys/dirent.h +++ b/newlib/libc/sys/rtems/sys/dirent.h @@ -31,6 +31,10 @@ int closedir(DIR *); void seekdir(DIR *dir, long loc); long telldir(DIR *dir); +#ifdef _COMPILING_NEWLIB +void _seekdir(DIR *dir, long offset); +#endif + #include #include