fix: clean up Windows timer includes

- Removed legacy GCC-specific include block.
- Added compiler-specific headers:
  - MSVC (_MSC_VER): includes <timeapi.h> and links winmm.lib
  - Other compilers: includes <mmsystem.h>
- Ensures cross-compiler compatibility and avoids duplicate headers.
This commit is contained in:
nordync 2025-12-23 12:48:48 +03:00 committed by GitHub
parent c90321712e
commit 943af4257a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,16 +41,11 @@
#ifdef _MSC_VER #ifdef _MSC_VER
#include <timeapi.h> #include <timeapi.h>
#pragma comment(lib, "winmm.lib")
#else #else
#include <mmsystem.h> #include <mmsystem.h>
#endif #endif
#ifdef __GNUC__
#include "mmsystem.h"
#else
#pragma comment(lib, "winmm.lib")
#endif
#define portMAX_INTERRUPTS ( ( uint32_t ) sizeof( uint32_t ) * 8UL ) /* The number of bits in an uint32_t. */ #define portMAX_INTERRUPTS ( ( uint32_t ) sizeof( uint32_t ) * 8UL ) /* The number of bits in an uint32_t. */
#define portNO_CRITICAL_NESTING ( ( uint32_t ) 0 ) #define portNO_CRITICAL_NESTING ( ( uint32_t ) 0 )