add POLARSSL_PLATFORM_EXIT_ALT
This commit is contained in:
parent
6aa04bcd85
commit
c39cb4986b
3 changed files with 56 additions and 3 deletions
|
@ -140,4 +140,27 @@ int platform_set_fprintf( int (*fprintf_func)( FILE *, const char *, ... ) )
|
|||
}
|
||||
#endif /* POLARSSL_PLATFORM_FPRINTF_ALT */
|
||||
|
||||
#if defined(POLARSSL_PLATFORM_EXIT_ALT)
|
||||
#if !defined(POLARSSL_STD_EXIT)
|
||||
/*
|
||||
* Make dummy function to prevent NULL pointer dereferences
|
||||
*/
|
||||
static void platform_exit_uninit( int status )
|
||||
{
|
||||
((void) status);
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#define POLARSSL_STD_EXIT platform_exit_uninit
|
||||
#endif /* !POLARSSL_STD_EXIT */
|
||||
|
||||
int (*polarssl_exit)( int status ) = POLARSSL_STD_EXIT;
|
||||
|
||||
int platform_set_exit( void (*exit_func)( int status ) )
|
||||
{
|
||||
polarssl_exit = exit_func;
|
||||
return( 0 );
|
||||
}
|
||||
#endif /* POLARSSL_PLATFORM_EXIT_ALT */
|
||||
|
||||
#endif /* POLARSSL_PLATFORM_C */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue