fix #864
fix #894,partly fix #891
fix wrong redeclare in different interfaces.
fix test fail in Travis CI,caused by filename case sensitive diff in mac and linux
Merge pull request #895 from bronze1man/pr-864

fix #864, fix #894,partly fix #891,fix wrong redeclare in different interfaces.