X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fmkdef.pl;h=1ca1112d04b56bc5d6d1f2378eb33a0df26b9e63;hp=d7baf8aa050378a685fc9c602141a8f3a5ab4259;hb=f19a5ff9ab85313f5b30cfc9fbed3a2eea60a59d;hpb=8d2214c0a49584044d96b80e846ac8f6df35a0ad diff --git a/util/mkdef.pl b/util/mkdef.pl index d7baf8aa05..1ca1112d04 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -36,7 +36,7 @@ # The semantics for the platforms is that every item is checked against the # environment. For the negative items ("!FOO"), if any of them is false # (i.e. "FOO" is true) in the environment, the corresponding symbol can't be -# used. For the positive itms, if all of them are false in the environment, +# used. For the positive items, if all of them are false in the environment, # the corresponding symbol can't be used. Any combination of positive and # negative items are possible, and of course leave room for some redundancy. # - "kind" is "FUNCTION" or "VARIABLE". The meaning of that is obvious. @@ -83,7 +83,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", "SHA256", "SHA512", "RMD160", "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "EC2M", - "HMAC", "AES", "CAMELLIA", "SEED", "GOST", "ARIA", + "HMAC", "AES", "CAMELLIA", "SEED", "GOST", "ARIA", "SM4", "SCRYPT", "CHACHA", "POLY1305", "BLAKE2", "SIPHASH", # EC_NISTP_64_GCC_128 @@ -412,10 +412,10 @@ sub do_defs print STDERR "DEBUG: parsing ----------\n" if $debug; while() { + s|\R$||; # Better chomp if($parens > 0) { #Inside a DEPRECATEDIN $stored_multiline .= $_; - $stored_multiline =~ s|\R$||; # Better chomp print STDERR "DEBUG: Continuing multiline DEPRECATEDIN: $stored_multiline\n" if $debug; $parens = count_parens($stored_multiline); if ($parens == 0) { @@ -441,7 +441,7 @@ sub do_defs } if(/\/\*/) { - if (not /\*\//) { # multiline comment... + if (not /\*\//) { # multi-line comment... $line = $_; # ... just accumulate next; } else { @@ -625,7 +625,7 @@ sub do_defs $def .= "int d2i_$3(void);"; $def .= "int i2d_$3(void);"; # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -637,7 +637,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("$2_it","$2_it", "EXPORT_VAR_AS_FUNCTION", @@ -649,7 +649,7 @@ sub do_defs $def .= "int $3_free(void);"; $def .= "int $3_new(void);"; # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -661,7 +661,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("$2_it","$2_it", "EXPORT_VAR_AS_FUNCTION", @@ -674,7 +674,7 @@ sub do_defs $def .= "int $1_free(void);"; $def .= "int $1_new(void);"; # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -686,7 +686,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("$1_it","$1_it", "EXPORT_VAR_AS_FUNCTION", @@ -696,7 +696,7 @@ sub do_defs $def .= "int d2i_$2(void);"; $def .= "int i2d_$2(void);"; # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -708,7 +708,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("$2_it","$2_it", "EXPORT_VAR_AS_FUNCTION", @@ -724,7 +724,7 @@ sub do_defs $def .= "int $2_free(void);"; $def .= "int $2_new(void);"; # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -736,7 +736,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("$2_it","$2_it", "EXPORT_VAR_AS_FUNCTION", @@ -744,7 +744,7 @@ sub do_defs next; } elsif (/^\s*DECLARE_ASN1_ITEM\s*\(\s*(\w*)\s*\)/) { # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -756,7 +756,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("$1_it","$1_it", "EXPORT_VAR_AS_FUNCTION", @@ -822,7 +822,7 @@ sub do_defs next; } elsif (/^OPENSSL_DECLARE_GLOBAL\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { # Variant for platforms that do not - # have to access globale variables + # have to access global variables # in shared libraries through functions $def .= "#INFO:" @@ -834,7 +834,7 @@ sub do_defs .join(',',@current_platforms).":" .join(',',@current_algorithms).";"; # Variant for platforms that have to - # access globale variables in shared + # access global variables in shared # libraries through functions &$make_variant("_shadow_$2","_shadow_$2", "EXPORT_VAR_AS_FUNCTION", @@ -847,7 +847,6 @@ sub do_defs \@current_algorithms); } else { $stored_multiline = $_; - $stored_multiline =~ s|\R$||; print STDERR "DEBUG: Found multiline DEPRECATEDIN starting with: $stored_multiline\n" if $debug; next; }