Support testing baremetal builds without the UNIXLIKE code

When `MBEDTLS_TEST_PLATFORM_IS_NOT_UNIXLIKE` is defined, do not enable
`MBEDTLS_PLATFORM_IS_UNIXLIKE`. This lets us test baremetal builds as such
even if we happen to be building for Linux or other Unix-like platform.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2026-02-21 21:18:03 +01:00
parent dec0d500a8
commit 9cd92b207f

View File

@@ -29,7 +29,10 @@
/* Decide whether we're built for a Unix-like platform.
*/
#if defined(_WIN32)
#if defined(MBEDTLS_TEST_PLATFORM_IS_NOT_UNIXLIKE) //no-check-names
/* We may be building on a Unix-like platform, but for test purposes,
* do not try to use Unix features. */
#elif defined(_WIN32)
/* If Windows platform interfaces are available, we use them, even if
* a Unix-like might also to be available. */
/* defined(_WIN32) ==> we can include <windows.h> */