Added Linux C port.

Fixed compilation warnings.