ECDH: Add #ifdef filter to tests/scripts/list-enum-consts.pl
This allows the use of #ifdef ... #endif in enum definitions (e.g.,
mbedtls_ecdh_variant in ecdh.h).
diff --git a/tests/scripts/list-enum-consts.pl b/tests/scripts/list-enum-consts.pl
index 21c25b3..ebd9b7e 100755
--- a/tests/scripts/list-enum-consts.pl
+++ b/tests/scripts/list-enum-consts.pl
@@ -22,7 +22,7 @@
$state = 'in';
} elsif( $state eq 'in' and /}/ ) {
$state = 'out';
- } elsif( $state eq 'in' ) {
+ } elsif( $state eq 'in' and not (/^#if/ or /#endif/)) {
s/=.*//; s!/\*.*!!; s/,.*//; s/\s+//g; chomp;
push @consts, $_ if $_;
}