Exclude macros from query_config.c generation
diff --git a/scripts/generate_query_config.pl b/scripts/generate_query_config.pl
index 747001a..651f0d4 100755
--- a/scripts/generate_query_config.pl
+++ b/scripts/generate_query_config.pl
@@ -23,6 +23,15 @@
 my $query_config_format_file = "./scripts/data_files/query_config.fmt";
 my $query_config_file = "./programs/ssl/query_config.c";
 
+# Excluded macros from the generated query_config.c. For example, macros that
+# have commas or function-like macros cannot be transformed into strings easily
+# using the preprocessor, so they should be excluded or the preprocessor will
+# throw errors.
+my @excluded = qw(
+MBEDTLS_SSL_CIPHERSUITES
+);
+my $excluded_re = join '|', @excluded;
+
 open(CONFIG_FILE, "$config_file") or die "Opening config file '$config_file': $!";
 
 # This variable will contain the string to replace in the CHECK_CONFIG of the
@@ -36,6 +45,9 @@
         # Skip over the macro that prevents multiple inclusion
         next if "MBEDTLS_CONFIG_H" eq $name;
 
+        # Skip over the macro if it is in the ecluded list
+        next if $name =~ /$excluded_re/;
+
         $config_check .= "#if defined($name)\n";
         $config_check .= "    if( strcmp( \"$name\", config ) == 0 )\n";
         $config_check .= "    {\n";