ftruncate substitute
Shaun Jackman
sjackman@gmail.com
Tue Dec 7 18:56:00 GMT 2004
usleep is implemented in sys/linux/usleep.c, but not exported in
linux/sys/unistd.h. It is exported in include/sys/unistd.h armoured in
defined(__CYGWIN__) || defined(__rtems__). glibc exports it in
include/unistd.h armoured in defined __USE_BSD || defined
__USE_XOPEN_EXTENDED.
ftruncate is in the same position as usleep. It is defined as a system
call in sys/linux/io.c and exported in include/sys/unistd.h armoured
in defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__). glibc
exports it in include/unistd.h armoured in defined __USE_BSD ||
defined __USE_XOPEN_EXTENDED.
Can these two declarations be added to linux/sys/unistd.h possibly
armoured in an ifdef, though I'm not sure which ifdef suits newlib
best.
Thanks,
Shaun
On Mon, 6 Dec 2004 18:34:52 -0800, Shaun Jackman <sjackman@gmail.com> wrote:
> I'm porting a glibc application to newlib. The application uses a
> couple functions not in newlib, ftruncate and usleep. For usleep I can
> substitue a call to nanosleep; although I'll probably just implement
> usleep using nanosleep. With what can I replace the ftruncate function
> call?
>
> Thanks,
> Shaun
More information about the Newlib
mailing list