version_check_feature() added to check for compile-time options at run-time

This commit is contained in:
Paul Bakker 2014-04-30 11:49:44 +02:00
parent 8394684dd3
commit 0f90d7d2b5
11 changed files with 726 additions and 4 deletions

View file

@ -3,7 +3,7 @@
*
* \brief Run-time version information
*
* Copyright (C) 2006-2013, Brainspark B.V.
* Copyright (C) 2006-2014, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -83,6 +83,22 @@ void version_get_string( char *string );
*/
void version_get_string_full( char *string );
/**
* \brief Check if support for a feature was compiled into this
* PolarSSL binary. This allows you to see at runtime if the
* library was for instance compiled with or without
* Multi-threading support.
*
* Note: only checks against defines in the sections "System
* support", "PolarSSL modules" and "PolarSSL feature
* support" in config.h
*
* \param feature The string for the define to check (e.g. "POLARSSL_AES_C")
*
* \return 0 if the feature is present, -1 if not.
*/
int version_check_feature( const char *feature );
#ifdef __cplusplus
}
#endif