libc dependency
Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 20 05:10:06 PDT 2017
On 6/20/17 7:23 AM, Jacob Carlborg wrote:
> On 2017-06-20 01:29, Steven Schveighoffer wrote:
>
>> I may have misspoke. I mean they didn't depend on the library itself.
>> I think they do depend on the C wrappers.
>>
>> So for instance, they didn't use FILE *, but instead used
>> read/write/recv/send.
>
> They did use the Posix and Windows API functions. I can see some imports
> for libc and Posix functions spread out here and there [1], but I'm not
> too familiar with are system calls and which are not. It's certainly no
> way near how much is used in Phobos today.
I remember they specifically did not want to depend on anything in the C
library.
In windows, they definitely did not depend on C at all, and did not link
with msvcrt or any other C runtime. The calls were all to the ntdll.dll.
Really this is the way it *should* be in Posix as well, but they just
stuff everything into libc.
As it stands, Phobos uses C runtime features extensively, and it would
be hard to get rid of the calls.
-Steve
More information about the Digitalmars-d-learn
mailing list