mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
modify library/memory_buffer_alloc.c, benchmark.c and the tests main code to use polarssl_exit
This commit is contained in:
parent
c39cb4986b
commit
77d3638497
3 changed files with 42 additions and 26 deletions
|
|
@ -1,3 +1,16 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_exit exit
|
||||
#define polarssl_free free
|
||||
#define polarssl_malloc malloc
|
||||
#define polarssl_fprintf fprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C)
|
||||
#include "polarssl/memory_buffer_alloc.h"
|
||||
#endif
|
||||
|
|
@ -268,7 +281,7 @@ int main()
|
|||
{
|
||||
polarssl_fprintf( stderr, "FAILED: FATAL PARSE ERROR\n" );
|
||||
fclose(file);
|
||||
exit( 2 );
|
||||
polarssl_exit( 2 );
|
||||
}
|
||||
else
|
||||
total_errors++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue