When I use strdup in Microsoft Visual C++, it warns me:
strdup
warning C4996: \'strdup\': The POSIX name for this item is deprecated. Instead, u
it's not a warning but an error reported in higher version of vs.
use macro #ifdef WIN32 to switch
#ifdef WIN32