--- src/libical/icaltimezone.c Sat Sep 26 21:38:51 2009 +++ src/libical/icaltimezone.c Fri Oct 30 13:58:17 2009 @@ -54,6 +54,12 @@ /* The gmtime() in Microsoft's C library is MT-safe */ #define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) + +// MSVC lacks the POSIX macro S_ISDIR, however it's a trivial one: +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) +#endif + #endif /** This is the toplevel directory where the timezone data is installed in. */ --- src/ical.h Sat Sep 26 21:38:53 2009 +++ src/ical.h Fri Oct 30 13:57:35 2009 @@ -18,6 +18,9 @@ the License at http://www.mozilla.org/MPL/ ************************************************************************/ - +#ifdef _MSC_VER +#pragma message("WARNING: #include is deprecated. Please #include instead.") +#else #warning "#include is deprecated. Please #include instead." +#endif #include --- CMakeLists.txt Sat Sep 26 21:38:55 2009 +++ CMakeLists.txt Fri Oct 30 13:56:20 2009 @@ -41,7 +41,7 @@ # make msvc less verbose if(WIN32) if(MSVC) - add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DYY_NO_UNISTD_H) endif(MSVC) add_definitions(-DBIG_ENDIAN=0 -DLITTLE_ENDIAN=1 -DBYTE_ORDER=BIG_ENDIAN) endif(WIN32)