Showing the changes to codec/encoder/core/src/utils.cpp (1 of 14 files). Show all
Unified · Split
| @@ -46,6 +46,9 @@ · 45 unmodified lines | |||
| 46 | #include <windows.h> | 46 | #include <windows.h> |
| 47 | #include <sys/types.h> | 47 | #include <sys/types.h> |
| 48 | #include <sys/timeb.h> | 48 | #include <sys/timeb.h> |
| 49 | #ifndef _MSC_VER | ||
| 50 | #include <sys/time.h> | ||
| 51 | #endif | ||
| 49 | #else | 52 | #else |
| 50 | #include <sys/time.h> | 53 | #include <sys/time.h> |
| 51 | #endif | 54 | #endif |
| @@ -147,23 +150,20 @@ void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, v · 95 unmodified lines | |||
| 147 | 150 | ||
| 148 | if (pEncCtx) { | 151 | if (pEncCtx) { |
| 149 | time_t l_time; | 152 | time_t l_time; |
| 150 | #if defined(_WIN32) | 153 | #if defined(_WIN32) && defined(_MSC_VER) |
| 151 | #if defined(_MSC_VER) | ||
| 152 | #if _MSC_VER >= 1500 | 154 | #if _MSC_VER >= 1500 |
| 153 | struct tm t_now; | 155 | struct tm t_now; |
| 154 | #else//VC6 | 156 | #else//VC6 |
| 155 | struct tm* t_now; | 157 | struct tm* t_now; |
| 156 | #endif//_MSC_VER >= 1500 | 158 | #endif//_MSC_VER >= 1500 |
| 157 | #endif//_MSC_VER | ||
| 158 | #else//__GNUC__ | 159 | #else//__GNUC__ |
| 159 | struct tm* t_now; | 160 | struct tm* t_now; |
| 160 | #endif//WIN32 | 161 | #endif//WIN32 |
| 161 | 162 | ||
| 162 | #if defined( _WIN32 ) | 163 | #if defined( _WIN32 ) && defined(_MSC_VER) |
| 163 | struct _timeb tb; | 164 | struct _timeb tb; |
| 164 | 165 | ||
| 165 | time (&l_time); | 166 | time (&l_time); |
| 166 | #ifdef _MSC_VER | ||
| 167 | #if _MSC_VER >= 1500 | 167 | #if _MSC_VER >= 1500 |
| 168 | LOCALTIME (&t_now, &l_time); | 168 | LOCALTIME (&t_now, &l_time); |
| 169 | #else | 169 | #else |
| @@ -172,7 +172,6 @@ void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, v · 2 unmodified lines | |||
| 172 | return; | 172 | return; |
| 173 | } | 173 | } |
| 174 | #endif//_MSC_VER >= 1500 | 174 | #endif//_MSC_VER >= 1500 |
| 175 | #endif//_MSC_VER | ||
| 176 | FTIME (&tb); | 175 | FTIME (&tb); |
| 177 | #elif defined( __GNUC__ ) | 176 | #elif defined( __GNUC__ ) |
| 178 | struct timeval tv; | 177 | struct timeval tv; |