This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Official Linux system wrapper library?

From: David Newall
> Sent: 23 November 2018 14:11
> On 24/11/18 12:04 am, Florian Weimer wrote:
> > But socketcall does not exist on all architectures.  Neither does
> > getpid, it's called getxpid on some architectures.
> > ...
> > I think it would be a poor approach to expose application developers to
> > these portability issues.  We need to abstract over these differences at
> > a certain layer, and applications are too late.
> Interesting.  I think the opposite.  I think exposing the OS's
> interfaces is exactly what a c-library should do.  It might also provide
> alternative interfaces that work consistently across different
> platforms, but in addition to, not instead of the OS interface.

Also, it really shouldn't implement broken workarounds for 'missing'
system calls.
At least one C library I've met converted pread() into lseek() and read().
That is just so broken it is better to fail to link or fail at runtime.

Never mind all the fun trying to read CLOCK_MONOTONIC.


Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]