Added more C defs and started implemeting select.