add global.h
support win32 platform.