syscall stubs (Was: Re: RFA: Add Epiphany newlib & libgloss port)

Joern Rennecke
Fri Nov 11 18:55:00 GMT 2011

Quoting Jim Meyering <>:

> stat always succeeds.  Even with a very rudimentary file system, shouldn't
>   stat be able to fail with ENOENT, EFAULT, ENAMETOOLONG, ENOTDIR, etc?
> fstat always succeeds.  What about EBADF, EFAULT, etc.?

> link.c always fails with EMLINK;  wouldn't ENOSYS be better?
> wait.c: likewise always with ECHILD;  wouldn't ENOSYS be better?
>   Tools that detect lack of support recognize ENOSYS as indicating that.

These minimal stubs agree with what the newlib documentation
says at under 14.1 .

Is that documentation wrong?

More information about the Newlib mailing list