[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-api
Subject:    RE: Official Linux system wrapper library?
From:       David Laight <David.Laight () ACULAB ! COM>
Date:       2018-11-28 13:18:53
Message-ID: 3e5914fce1534c698114bdf171c16c5d () AcuMS ! aculab ! com
[Download RAW message or body]

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.

	David

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic