Fix query_config macro expansion for windows
This commit is contained in:
parent
5bc6e92b70
commit
27b3372c45
3 changed files with 309 additions and 307 deletions
|
@ -106,13 +106,14 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
/* Helper macros to convert a macro or its expansion into a string */
|
||||
#if defined(_MSC_VER)
|
||||
#define MACRO_EXPANSION_TO_STR(macro) strlen( #macro ) > 0 ? #macro "\n" : ""
|
||||
#else
|
||||
/*
|
||||
* Helper macros to convert a macro or its expansion into a string
|
||||
* WARNING: This does not work for expanding function-like macros. However,
|
||||
* Mbed TLS does not currently have configuration options used in this fashion.
|
||||
*/
|
||||
#define MACRO_EXPANSION_TO_STR(macro) MACRO_NAME_TO_STR(macro)
|
||||
#define MACRO_NAME_TO_STR(macro) strlen( #macro ) > 0 ? #macro "\n" : ""
|
||||
#endif /* _MSC_VER */
|
||||
#define MACRO_NAME_TO_STR(macro) \
|
||||
mbedtls_printf( "%s", strlen( #macro "" ) > 0 ? #macro "\n" : "" )
|
||||
|
||||
int query_config( const char *config )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue