Re: [dev] on a potential libc replacement

From: Szabolcs Nagy <nszabolcs_AT_gmail.com>
Date: Tue, 26 May 2009 18:56:14 +0200

On 5/26/09, Kris Maglione <maglione.k_AT_gmail.com> wrote:
> On Tue, May 26, 2009 at 05:13:23PM +0200, Szabolcs Nagy wrote:
>>posix syscalls cannot be implemented in a cross platform way, they
>>depend on system internals
> It's possible to write portable code that utilizes platform (or
> architecture) specific code. You need to segregate the portable
> portions from the unportable portions, so that porting only
> requires writing some system call stubs for each new host OS,
i agree mostly, but in an ideal world syscalls would be those
"unportable stubs" themselfs, hence my comment

most of posix can be implemented in a reasonably portable way (and
there are several projects which try to do exactly that), i never said
otherwise

however i still maintain that a posix conformant, portable lib is
unreasonably difficult (even a posix conformant portable ioctl
implementation would be a hell..)

>>not be implemented in pure c: malloc or setjump depend on system
>>internals or syscalls
> Malloc can be implemented in pure C, assuming that the library
> already implements mmap or sbrk.
i meant standard c, but yes malloc is not the best example so add
signal and raise to the list instead
Received on Tue May 26 2009 - 16:56:14 UTC

This archive was generated by hypermail 2.2.0 : Tue May 26 2009 - 17:00:01 UTC