mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-14 20:01:00 +03:00
Test assumptions we make about the platform
Things that are not guaranteed by the standard but should be true of all platforms of interest to us: - 8-bit chars - NULL pointers represented by all-bits-zero
This commit is contained in:
@ -30,6 +30,15 @@
|
||||
#ifndef MBEDTLS_CHECK_CONFIG_H
|
||||
#define MBEDTLS_CHECK_CONFIG_H
|
||||
|
||||
/*
|
||||
* We assume CHAR_BIT is 8 in many places. In practice, this is true on our
|
||||
* target platforms, so not an issue, but let's just be extra sure.
|
||||
*/
|
||||
#include <limits.h>
|
||||
#if CHAR_BIT != 8
|
||||
#error "mbed TLS requires a platform with 8-bit chars"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_DEPRECATED_WARNING) && \
|
||||
!defined(__GNUC__) && !defined(__clang__)
|
||||
#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang"
|
||||
|
Reference in New Issue
Block a user