Portable C-implementation of CC internals
