945b23c46f
We used to include platform.h only when MBEDTLS_PLATFORM_C was enabled, and to define ad hoc replacements for mbedtls_xxx functions on a case-by-case basis when MBEDTLS_PLATFORM_C was disabled. The only reason for this complication was to allow building individual source modules without copying platform.h. This is not something we support or recommend anymore, so get rid of the complication: include platform.h unconditionally. There should be no change in behavior since just including the header should not change the behavior of a program. This commit replaces most occurrences of conditional inclusion of platform.h, using the following code: ``` perl -i -0777 -pe 's!#if.*\n#include "mbedtls/platform.h"\n(#else.*\n(#define (mbedtls|MBEDTLS)_.*\n|#include <(stdarg|stddef|stdio|stdlib|string|time)\.h>\n)*)?#endif.*!#include "mbedtls/platform.h"!mg' $(git grep -l '#include "mbedtls/platform.h"') ``` Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
||
---|---|---|
.. | ||
data_files | ||
mbedtls_dev | ||
abi_check.py | ||
apidoc_full.sh | ||
assemble_changelog.py | ||
basic.requirements.txt | ||
bump_version.sh | ||
ci.requirements.txt | ||
code_size_compare.py | ||
config.pl | ||
config.py | ||
driver.requirements.txt | ||
ecc-heap.sh | ||
ecp_comb_table.py | ||
find-mem-leak.cocci | ||
footprint.sh | ||
generate_driver_wrappers.py | ||
generate_errors.pl | ||
generate_features.pl | ||
generate_psa_constants.py | ||
generate_query_config.pl | ||
generate_ssl_debug_helpers.py | ||
generate_visualc_files.pl | ||
maintainer.requirements.txt | ||
make_generated_files.bat | ||
massif_max.pl | ||
memory.sh | ||
min_requirements.py | ||
output_env.sh | ||
rm-calloc-cast.cocci | ||
tmp_ignore_makefiles.sh | ||
windows_msbuild.bat |