[MSVC-MingW] Move windows headers to port.c

This prevents the inclusion of windows.h. into all header files using
FreeRTOS.h and thus defining several macros conflicting with common
definitions.
This commit is contained in:
Christoph Reiter 2025-07-30 16:06:30 +02:00
parent 2da35debfd
commit b27722a30e
2 changed files with 8 additions and 11 deletions

View file

@ -33,6 +33,14 @@
#include "FreeRTOS.h"
#include "task.h"
#ifdef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#else
#include <winsock.h>
#endif
#include <timeapi.h>
#ifdef __GNUC__
#include "mmsystem.h"
#else

View file

@ -29,17 +29,6 @@
#ifndef PORTMACRO_H
#define PORTMACRO_H
#ifdef WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#else
#include <winsock.h>
#endif
#include <windows.h>
#include <timeapi.h>
#include <mmsystem.h>
#include <winbase.h>
#ifdef __cplusplus
extern "C" {
#endif