fix errno usage
use dll of wcecompat