add vs build and ANSI C compliant