fix signed and unsigned comparision in macros in public headers