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 | 46 | #include <windows.h> |
| 47 | 47 | #include <sys/types.h> |
| 48 | 48 | #include <sys/timeb.h> |
| 49 | +#ifndef _MSC_VER | |
| 50 | +#include <sys/time.h> | |
| 51 | +#endif | |
| 49 | 52 | #else |
| 50 | 53 | #include <sys/time.h> |
| 51 | 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 | 151 | if (pEncCtx) { |
| 149 | 152 | time_t l_time; |
| 150 | −#if defined(_WIN32) | |
| 151 | −#if defined(_MSC_VER) | |
| 153 | +#if defined(_WIN32) && defined(_MSC_VER) | |
| 152 | 154 | #if _MSC_VER >= 1500 |
| 153 | 155 | struct tm t_now; |
| 154 | 156 | #else//VC6 |
| 155 | 157 | struct tm* t_now; |
| 156 | 158 | #endif//_MSC_VER >= 1500 |
| 157 | −#endif//_MSC_VER | |
| 158 | 159 | #else//__GNUC__ |
| 159 | 160 | struct tm* t_now; |
| 160 | 161 | #endif//WIN32 |
| 161 | 162 | |
| 162 | −#if defined( _WIN32 ) | |
| 163 | +#if defined( _WIN32 ) && defined(_MSC_VER) | |
| 163 | 164 | struct _timeb tb; |
| 164 | 165 | |
| 165 | 166 | time (&l_time); |
| 166 | −#ifdef _MSC_VER | |
| 167 | 167 | #if _MSC_VER >= 1500 |
| 168 | 168 | LOCALTIME (&t_now, &l_time); |
| 169 | 169 | #else |
| @@ -172,7 +172,6 @@ void WelsLogDefault (void* pCtx, const int32_t kiLevel, const str_t* kpFmtStr, v · 2 unmodified lines | ||
| 172 | 172 | return; |
| 173 | 173 | } |
| 174 | 174 | #endif//_MSC_VER >= 1500 |
| 175 | −#endif//_MSC_VER | |
| 176 | 175 | FTIME (&tb); |
| 177 | 176 | #elif defined( __GNUC__ ) |
| 178 | 177 | struct timeval tv; |