[Info-vax] September 6, 2016 - new Roadmap and State of the Port updates now on VSI website

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Thu Sep 8 16:05:08 EDT 2016


On 2016-09-08 19:29:08 +0000, David Froble said:

> I realize the word "porting" has been used above, but the comments 
> about capabilities in the C-RTL is disturbing.

C on OpenVMS doesn't correctly emulate the entirety of modern Unix 
systems.    This for various reasons, some practical and some just 
because the work was never committed.    The fork() call is the 
canonical example of am implementation limitation due to OpenVMS 
itself, though SSIO is another and more subtle case.  Missing 
constructs are common (some calls and headers from formal standards, 
other calls and headers are commonly used by C code compiled with clang 
or gcc), and the C and POSIX standard support is presently the subject 
of some... well... VSI has a long list of this stuff.

> Everything should be VMS capabilities, which could then be used in C.

Macro32 can get at everything on OpenVMS.   C can get at most 
everything — it's not so good at coroutines or other ugly shenanigans.

What's discussed in the thread is a mix of the old C support — partial 
C99, when C11 is current — and that what C presents to the users can 
also be limited by the implementation or limited by OpenVMS.   Or where 
there are what amounts to implementation bugs that are blocking open 
source porting efforts short of more substantial porting work, such as 
is the case with SSIO.

> And that includes documented as VMS capabilities so C-challenged people 
> can also understand and use them.

You're in luck then, because C on OpenVMS largely lacks adaptions for 
OpenVMS.    From the developer view, C really isn't integrated with 
traditional OpenVMS, though OpenVMS has made some affordances for C 
programming, including the C device driver work.   Then there's that 
the C headers are differentiated into the C header (portable) bits 
(DECC$RTLDEF.TLB), and the header bits from STARLET (published, stable 
APIs) (SYS$STARLET_C.TLB) and LIB (unstable or unpublished APIs) 
(SYS$LIB_C.TLB).    The latter two libraries parallel a model used 
elsewhere on OpenVMS.    More than a little of the glue code that's 
seen in C source code on OpenVMS is dealing with the OpenVMS APIs — 
this where the C library interfaces are inadequate or inappropriate.   
BASIC deals with descriptors in the compiler and run-time, for 
instance.   C requires developers to explicitly code and manage those 
and other OpenVMS-specific data structures, when references to those 
structures are necessary.

If you want to move past BASIC for your own interests and experience, 
maybe Python or Swift might be a better target.   Python is available 
on OpenVMS.   Swift, not so much.  There are (free) courses on both — 
and many other good and useful languages — around the 'net.


-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list