modified open call to be more compatible
force inlined memchr function to get around pointer arguments in non-inlined functions failing bound checking