next up previous contents
Next: VFS (Virtual File System) Up: The Fully Portable Subsystems Previous: Data Types   Contents

ANSI C library

KOS' built-in libc supports most of the standard ANSI C functions, ported mostly from the BSD library. KOS also includes an integrated copy of the Newlib libm library so that you are guaranteed that your libraries all match up.

The libc includes the stdio file functions as well, to wrap its native VFS functions, so that you do not have to port that functionality.

memcpy2, memset2, memcpy4 and memset4 are hardware helper functions which work like memset and memcpy, but they copy the specified number of bits at a time. memalign is a memory helper function which assures alignment on a certain byte boundary for hardware buffers.

Many people have commented that KOS' libc is somewhat spartan compared to many modern libc's such as glibc, BSD, and Newlib. However, we feel like the KOS libc is probably more than sufficient for most console efforts (games, demos, etc). If you want a more complete portability layer then you might be looking in the wrong place - perhaps DC Linux or NetBSD would be better suited to your application. KOS makes no bones about being pretty bare when it comes to standard POSIX style functionality. Still, there's more than enough here to drive the console-intensive parts of your application as long as you're willing to do a bit of porting work.


next up previous contents
Next: VFS (Virtual File System) Up: The Fully Portable Subsystems Previous: Data Types   Contents
Dan Potter 2002-07-29