diff --git a/src/basicio.cpp b/src/basicio.cpp index e81e5768..24815e0c 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp @@ -383,7 +383,7 @@ namespace Exiv2 { int FileIo::close() { - munmap(); + munmap(); if (fp_ != 0) { std::fclose(fp_); fp_= 0; diff --git a/src/localtime.c b/src/localtime.c index 6bbca8c2..502ae9d3 100644 --- a/src/localtime.c +++ b/src/localtime.c @@ -1412,6 +1412,9 @@ const long offset; /* ahu: deleted definition of timelocal */ +/* rmills - timegm is replaced with _mkgmtime on VC 2005 and up */ +/* - see timegm.h */ +#if !defined(_MSC_VER) || (_MSC_VER < 1400) time_t timegm(tmp) struct tm * const tmp; @@ -1419,6 +1422,11 @@ struct tm * const tmp; tmp->tm_isdst = 0; return time1(tmp, gmtsub, 0L); } +#endif + + + + /* ahu: deleted definition of timeoff */ diff --git a/src/timegm.h b/src/timegm.h index 153ec15e..e9592c6d 100644 --- a/src/timegm.h +++ b/src/timegm.h @@ -6,11 +6,6 @@ #ifndef TIMEGM_H_ #define TIMEGM_H_ -/* Visual Studio C++ 2005 (8.0) uses 64 bit time_t, which doesn't work */ -#if defined _MSC_VER && _MSC_VER >= 1400 -# define _USE_32BIT_TIME_T -#endif - #include /* @@ -84,7 +79,13 @@ extern "C" { #endif // The UTC version of mktime +/* rmills - timegm is replaced with _mkgmtime on VC 2005 and up */ +/* - see localtime.c */ +#if !defined(_MSC_VER) || (_MSC_VER < 1400) time_t timegm(struct tm * const tmp); +#else +#define timegm _mkgmtime +#endif #ifdef __cplusplus }