How did StdCLib development work?

eharmon

Well-known member
Looking at StdCLib, I have trouble making heads or tails of how things worked in practice, the list of caveats seems large. A few snippets:

StdCLib is a shared library located in the ROM on all PowerPC-based Mac OS compatible computers providing functionality for programs compiled using the C language. StdCLib has been present on all PowerPC models, and prior to System 7.6 updates were provided via the StdCLibInit system extension.

An incompatibility exists between Mac OS 8.5 and StdCLib v3.4.4 or later when running on certain Power Macintosh computers including 6100/7100/8100's and 5200/6200's. The problem occurs if StdCLib v3.4.4 or later is installed in the Extensions folder, and is due to the way the system loads and registers libraries at boot time. The result is that programs may successfully complete execution but then crash when exiting. The workaround for this problem is to move StdCLib from the Extensions folder to the MPW folder and then put aliases to StdCLib in all folders that contain programs which require it. This will ensure that the correct exit code will be loaded into the program's context.

Note - This problem also occurs with System 7.6 and System 7.6.1 but does not occur with Mac OS 8.0, Mac OS 8.6 or Mac OS 9.0.

It gets weirder, prior to 7.6 it seems the system itself provided no StdCLib updates, meaning you always had what was in ROM which seems like it may vary between machines, unless something happened to install StdCLibInit Presumably there were only implementation changes and not API changes before 7.6 or that seems even more chaotic...

So, when you add that up:

1) Before 7.6, you just used whatever was in ROM unless a StdCLibInit extension was provided, which the system did not.
2) For 7.6+, various versions of StdCLib were provided by the system, which could be updated to newer libraries with a new copy in Extensions...except on a few machines and OS versions where bugs in, presumably, CFM and the ROM, cause problems.

Presumably since this was kinda...confusing...it became common enough to simply link against older StdCLib and forego new features, to the point where later MPW included thee (or four?) versions, 3.4.4, 3.5, and 3.7.

Which is curious, because there was a TON of C code by the mid 90s, and applications which ship their own StdCLib, or update the one on the system, seem few and far between, despite MPW shipping a copy to allow you to easily update systems (and MPW even requiring it itself!).

So how did people actually develop against StdCLib? Was it common practice to just target early versions and be done with it?
 
Top