Skip to content

Commit a9cb459

Browse files
nordyncmetepukkadamoninom1
authored
Win32: Guard timeapi.h include for MinGW compatibility (#1345)
* bugfix/mingw-timeapi * 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. --------- Co-authored-by: Metehan Öztürk <[email protected]> Co-authored-by: Monika Singh <[email protected]>
1 parent 536914b commit a9cb459

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

portable/MSVC-MingW/port.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@
3939
#include <winsock.h>
4040
#endif
4141

42-
#include <timeapi.h>
43-
44-
#ifdef __GNUC__
45-
#include "mmsystem.h"
46-
#else
42+
#ifdef _MSC_VER
43+
#include <timeapi.h>
4744
#pragma comment(lib, "winmm.lib")
45+
#else
46+
#include <mmsystem.h>
4847
#endif
4948

5049
#define portMAX_INTERRUPTS ( ( uint32_t ) sizeof( uint32_t ) * 8UL ) /* The number of bits in an uint32_t. */

0 commit comments

Comments
 (0)