Skip to content

Commit 943af42

Browse files
authored
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.
1 parent c903217 commit 943af42

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

portable/MSVC-MingW/port.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,11 @@
4141

4242
#ifdef _MSC_VER
4343
#include <timeapi.h>
44+
#pragma comment(lib, "winmm.lib")
4445
#else
4546
#include <mmsystem.h>
4647
#endif
4748

48-
#ifdef __GNUC__
49-
#include "mmsystem.h"
50-
#else
51-
#pragma comment(lib, "winmm.lib")
52-
#endif
53-
5449
#define portMAX_INTERRUPTS ( ( uint32_t ) sizeof( uint32_t ) * 8UL ) /* The number of bits in an uint32_t. */
5550
#define portNO_CRITICAL_NESTING ( ( uint32_t ) 0 )
5651

0 commit comments

Comments
 (0)