Programs in Plan 9 are generally written in rc, alef, or a dialect of ANSI C. The Plan 9 C dialect has some minor extensions and a few major restrictions. The most important restriction is that the compiler demands that all function definitions have ANSI prototypes and all function calls appear in the scope of a prototyped declaration of the function. Each system library has an associated header file, declaring all functions in that library. The standard Plan 9 library is called libc
, so all C source files include <libc.h>
. These rules guarantee that all functions are called with arguments having the expected types.