#include #if (!defined(_MSC_VER) && !defined(_WIN32)) # include # include #endif int main(void) { struct stat buf; if (stat (".", &buf) || !(buf.st_mode & S_IFDIR)) return 1; return 0; }