Problems with rewinddir() on RTEMS

Sebastian Huber
Mon Jul 5 14:13:00 GMT 2010


on some platforms RTEMS uses a 64-bit type for off_t (in particular PowerPC).
The function rewinddir() is implemented (libc/posix/rewinddir.c) in terms of:

_seekdir((dirp), (off_t)0);

For _seekdir() no prototype is present.  GCC chooses to pass (off_t) 0 as a
64-bit parameter (on PowerPC r5 and r6).  On the other hand we have

_DEFUN(_seekdir, (dirp, loc),
	register DIR *dirp _AND
	long loc)

Which has a different signature compared to above (on PowerPC r4 will contain
loc).  We must declare _seekdir() somewhere.

Have a nice day!

Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  :
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the Newlib mailing list