Inside an unofficial Shared C LibraryBy Chris Williams. Published: 20th Mar 2006, 23:51:42 | Permalink | Printable
Open sourcing RISC OS by stealthOf the 344 functions in the Castle Shared C Library, Graham Shaw has so far managed to implement 200 in his alternative module. A hundred of those have been fully tested, and this is after six weeks of development. When applications use his project's module, it prints a little banner to remind Graham that the program is using his unofficial SCL, although this will be disabled in the eventual public release.
By Graham's reckoning, his target is to recreate the official SCL's 48 base functions, 185 C library functions, and 111 functions related to 64bit support, the C99 standard and other bits and pieces.
The module is an open source affair, but will allow applications to use it without repercussions, such as requiring proprietary program authors to reveal their own source code. Developers can, it's expected, choose to use their own choice of 'stubs' library, as provided by the Castle C/C++ compiler kit, RISCOS Ltd's StubsG or with the GCCSDK.
He explained: "The library will be licensed under the GNU GPL, version 2 or later, with the libgcc exception, plus a formal statement explaining how I believe it should be applied to a RISC OS module."
It was anticipated that Graham, the man behind RiscPkg, would re-use source code from other projects, such as Unixlib, to craft his own SCL. However he said: "I'm keeping my options open. I have nothing against using other code, it just hasn't been worthwhile so far.
"So far all of the code has been written from scratch. This is because the SCL needs to meet quite a few requirements above and beyond ISO C compliance if it is to be fully compatible. For example, streams are partly implemented by macros, so they must be implemented in a very specific way.
"Also, although I have patched GCC so that it is usable within the SCL, there are parts of the language which aren't supported and would require substantial effort to fix. You can't, for example, use string literals because they are not relocated correctly. This is a significant barrier to the re-use of existing code."
On how long it will take to finish, he added: "To use a Debianism, it will be released when it's ready.
"This isn't a module you want to install on your computer in a half-baked state."
The development of an alternative Shared C Library by Graham Shaw opens many possible avenues of future development. It reminds us how modular RISC OS is, and how it's the sum of some 150 individual components - most of which can be swapped out and replaced, within reason.
While some modules do complex work, such as the Font Manager, others can be produced from scratch or through code re-use. For example, the MessageTrans module, of which a replacement is rumoured to be floating around, could be produced from scratch to replace the one supplied by the operating system.
This patchwork approach to introducing, bit by bit, an open source RISC OS by stealth can be criticised for perhaps introducing a degree of instability into the system by relying on software produced by different groups of programmers most likely working in their spare time - the headache for users juggling different variants and version numbers will not be insignificant.
On the other hand, it could lend a hand in updating components of the operating system that have been left untouched for too long. The debate isn't about to end any time soon.
Alternative Shared C Library in development
Previous: Alternative Shared C Library in development
Next: News in brief
DiscussionViewing threaded comments | View comments unthreaded, listed by date | Skip to the end
Please login before posting a comment. Use the form on the right to do so or create a free account.
Search the archives
Today's featured article
RISC OS in Japan
Who, where, what, when, how?
13 comments, latest by Sawadee on 14/4/05 10:01PM. Published: 4 Apr 2005
Popular ftp client FTPc reaches release 1.32
Discuss this. Published: 17 Feb 2001
News and media:
RISCOS Ltd •
RISC OS Open •
MW Software •
Advantage Six •
CJE Micros •
Liquid Silicon •
Chris Why's Acorn/RISC OS collection •
The Register •
The Inquirer •
Apple Insider •
BBC News •
Sky News •
Google News •