Why don't we use the CRT functions under Windows?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat May 22 16:25:08 UTC 2021


While working with the dmd codebase 
(https://github.com/dlang/dmd/pull/12560) I noticed that it 
systematically shuns C runtime calls to functions such as unlink, rename 
etc. Instead the code uses native Windows API calls (DeleteFile, MoveFile).

Spoke to Walter about it, he said the reason is mostly historical and 
for the most part forgotten and probably obsolete - at least in the 
past, Windows implementations of CRT was poorly done, had subtle 
differences, and bugs.

Is that still the case? If not, we could reduce the complexity of source 
code considerably by unifying version(Posix) and version(Windows) code.



More information about the Digitalmars-d mailing list