mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	check-names: Consider crypto-sourced header files
Many identifiers come from Mbed Crypto. Teach check-names.sh to look in the crypto submodule for identifiers, to avoid incorrect test results.
This commit is contained in:
		
							parent
							
								
									61fc108d25
								
							
						
					
					
						commit
						78d9d0c1e9
					
				@ -81,7 +81,7 @@ done
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
printf "Likely typos: "
 | 
					printf "Likely typos: "
 | 
				
			||||||
sort -u actual-macros enum-consts > _caps
 | 
					sort -u actual-macros enum-consts > _caps
 | 
				
			||||||
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
 | 
					HEADERS=$( ls include/mbedtls/*.h crypto/include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
 | 
				
			||||||
NL='
 | 
					NL='
 | 
				
			||||||
'
 | 
					'
 | 
				
			||||||
sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \
 | 
					sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \
 | 
				
			||||||
 | 
				
			|||||||
@ -8,7 +8,7 @@ use open qw(:std utf8);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
-d 'include/mbedtls' or die "$0: must be run from root\n";
 | 
					-d 'include/mbedtls' or die "$0: must be run from root\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ARGV = grep { ! /compat-1\.3\.h/ } <include/mbedtls/*.h>;
 | 
					@ARGV = grep { ! /compat-1\.3\.h/ } <include/mbedtls/*.h crypto/include/mbedtls/*.h>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my @consts;
 | 
					my @consts;
 | 
				
			||||||
my $state = 'out';
 | 
					my $state = 'out';
 | 
				
			||||||
 | 
				
			|||||||
@ -32,9 +32,9 @@ done
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if [ $INTERNAL ]
 | 
					if [ $INTERNAL ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    HEADERS=$( ls include/mbedtls/*_internal.h | egrep -v 'compat-1\.3\.h|bn_mul' )
 | 
					    HEADERS=$( ls include/mbedtls/*_internal.h crypto/include/mbedtls/*_internal.h | egrep -v 'compat-1\.3\.h|bn_mul' )
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h|bn_mul' )
 | 
					    HEADERS=$( ls include/mbedtls/*.h crypto/include/mbedtls/*.h | egrep -v 'compat-1\.3\.h|bn_mul' )
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rm -f identifiers
 | 
					rm -f identifiers
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ if [ -d include/mbedtls ]; then :; else
 | 
				
			|||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
 | 
					HEADERS=$( ls include/mbedtls/*.h crypto/include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
 | 
					sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
 | 
				
			||||||
    | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
 | 
					    | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user