Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!oberon!cit-vax!ucla-cs!zen!ucbvax!VENUS.YCC.YALE.EDU!leichter From: leichter@VENUS.YCC.YALE.EDU ("Jerry Leichter") Newsgroups: comp.os.vms Subject: re: Where is C$MEMFUNC Message-ID: <8709110439.AA19427@ucbvax.Berkeley.EDU> Date: Thu, 10-Sep-87 10:41:00 EDT Article-I.D.: ucbvax.8709110439.AA19427 Posted: Thu Sep 10 10:41:00 1987 Date-Received: Sat, 12-Sep-87 16:32:44 EDT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "Jerry Leichter" Organization: The ARPA Internet Lines: 61 On pages 6-10 to 6-12 of the VAX-C RTL Ref. Man. (March 1987) are described the "memchr" and "memset" functions (and some others). I tried to use these in a short C program. The program compiled OK, but the linker couldn't resolve these references. I looked in Appendix B of the same manual: On page B-12 and B-13 it states that these functions (entry points actually) are found in C$MEMFUNC. When I do a LIB/LIST of VAXCRTL.OLB, C$MEMFUNC isn't there although many other C$xxxxxx modules are present. This (and related) questions are probably making the release timing skew between VAX C V2.3 and VMS V4.6 the greatest source of VMS headaches in history. The problem is this: The VAX C product consists of a compiler and a run-time library. You get the compiler when you order VAX C; you get the run-time library, on the other hand, with VMS. They are separate products, and the RTL is NOT shipped with the (compiler) kit. This division is, with V2.3, even reflected in the documentation: There are now separate documents for the compiler and the library, and if you look REALLY closely at the cover pages, you'll discover that the compiler documentation says that the product it describes supports VMS V4.2 or higher - but the RTL documentation says IT supports VMS Version 4.6 or higher. So...you'll have to wait until VMS V4.6 to use the memxxx functions; they are not in the V4.5 version of the VAX C library. To anticipate the obvious question - why do things this way? Past practice was to ship language RTL's with VMS, and also with the compiler kit when there were major changes. This has, in the past, led to headaches, like people installing the compiler on a more recent VMS system and replacing an even-newer RTL with the "new" one from the kit is one, though that could be fixed by a more clever installation procedure. A more severe problem, harder to deal with, is that of support: The RTL's are a part of the "base VMS system", and if new RTL's are shipped with compilers, different "sub-versions" of VMS start to exist: VMS V4.5 with the V2.2 RTL; VMS 4.5 with the V2.3 RTL; and so on. If someone on a VMS V4.5/V2.3 RTL system compiles and links a C program, then moves that program to a VMS V4.5/V2.2 RTL system, the program won't work - although it's "the same version" of the operating system. (This happened a while back with PASCAL.) [Yes, if the program were linked against the .OLB, and so carried its own copy of the library routines it needed, it MIGHT work - but suppose the new library routines depended on some VMS system service, or something from the rest of the VMS RTL, that was added in VMS V4.6? Then you'd have a program that MIGHT work, sometimes, depending.] Shipping the RTL ONLY with VMS eliminates the "sub-versions". However, it leads to the problem being discussed here: There are now what amount to "sub- versions" of the COMPILER. Most of the time, this doesn't happen or isn't visible to the user: Few language systems have as extensive and as visible an RTL as C - most of the things in, say, PASRTL are never called directly by the user, but are called as a result of compiler-generated expansions of language elements. If there are any changes to such code, the new compiler would simply not work correctly without the new version of VMS - and so wouldn't be supported on the earlier version of the OS. C, however, has a fairly de-coupled compiler and RTL, so it is quite possible to have a compiler that runs on V4.2 and works with any RTL from V4.2 to V4.6. Add to this delays in the shipment of VMS V4.6, and you have a headache. -- Jerry ------