From c46ea38f908141c3c7f530fe603e3be336d68ecd Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Tue, 30 Oct 2018 21:52:53 +0000 Subject: [PATCH] Fix query_config macro expansion for windows --- programs/ssl/query_config.c | 4 ++++ scripts/data_files/query_config.fmt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/programs/ssl/query_config.c b/programs/ssl/query_config.c index 8ef5d3739..f560943e4 100644 --- a/programs/ssl/query_config.c +++ b/programs/ssl/query_config.c @@ -107,8 +107,12 @@ #include /* 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 #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 */ int query_config( const char *config ) { diff --git a/scripts/data_files/query_config.fmt b/scripts/data_files/query_config.fmt index ef57a7c6f..7ea4b5ab4 100644 --- a/scripts/data_files/query_config.fmt +++ b/scripts/data_files/query_config.fmt @@ -107,8 +107,12 @@ #include /* 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 #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 */ int query_config( const char *config ) {