Take bool declaration from gcc headers.
Minor fixes. Add StrNDup function.