[Info-vax] CRTL replacement (Re: Status of the PostgreSQL port?)

Craig A. Berry craigberry at nospam.mac.com
Mon Jun 29 23:04:26 EDT 2015


On 6/29/15 9:24 AM, Stephen Hoffman wrote:
> Deploy a
> new and modern C RTL VSIC$CRTL, either the existing C bits rethought and
> rewritten and re-architected, or possibly based on the musl C library,
> and schedule the existing DECC$CRTL for deprecation.

musl looks interesting and given the MIT license could likely be mined
for some of the missing routines, at least those that are restricted to
string handling or math and maybe some other areas. But overall it's
highly dependent on the Linux kernel, so the more that you're looking at
routines that do process handling, I/O, memory management, threads,
etc., the more the C library is just a very thin wrapper around
something else. Take the lowly chdir routine, which in musl is simply this:

#include <unistd.h>
#include "syscall.h"

int chdir(const char *path)
{
	return syscall(SYS_chdir, path);
}

That's it. The C library isn't actually doing much because the kernel
already does it. On VMS, that's not going to get you very far. You'll
have to call SYS$SETDIR, possibly after converting a Unix-style path to
native syntax, and adjusting the setting of PWD in the environment, plus
anything else the syscall does in Unix-land.

In short, basing something on musl would be way more than just doing a
port; it would involve rewriting most of the routines to do what the
current CRTL already does, or building a Linux kernel compatibility
layer for VMS, which might be interesting but would of course be a
massive project.

Given that we're still begging for the CRTL that DEC started in its
heyday but never finished to get to some reasonable state of completion,
I'd not be entirely happy to see VSI embarking on an entirely new one.




More information about the Info-vax mailing list