aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-02-19 16:06:34 +0000
committerRichard Levitte <levitte@openssl.org>2001-02-19 16:06:34 +0000
commitcf1b7d96647d55e533f779e476e3d4371f40445a (patch)
treef7d6534cf77223190eaefe68d9e192d3d1246206 /util
parent649c5a2b096e89692b07dbbe19d2dbb12a9db075 (diff)
downloadopenssl-cf1b7d96647d55e533f779e476e3d4371f40445a.tar.gz
Make all configuration macros available for application by making
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
Diffstat (limited to 'util')
-rwxr-xr-xutil/libeay.num48
-rwxr-xr-xutil/mk1mf.pl44
-rwxr-xr-xutil/mkdef.pl26
-rw-r--r--util/pl/BC-16.pl4
-rw-r--r--util/pl/BC-32.pl2
-rw-r--r--util/pl/VC-16.pl2
-rw-r--r--util/pl/VC-32.pl6
7 files changed, 67 insertions, 65 deletions
diff --git a/util/libeay.num b/util/libeay.num
index db87154e04..31eae7e19e 100755
--- a/util/libeay.num
+++ b/util/libeay.num
@@ -196,8 +196,8 @@ DH_generate_key 203 EXIST::FUNCTION:DH
DH_generate_parameters 204 EXIST::FUNCTION:DH
DH_new 205 EXIST::FUNCTION:DH
DH_size 206 EXIST::FUNCTION:DH
-DHparams_print 207 EXIST::FUNCTION:BIO,DH
-DHparams_print_fp 208 EXIST::FUNCTION:DH,FP_API
+DHparams_print 207 EXIST::FUNCTION:DH,BIO
+DHparams_print_fp 208 EXIST::FUNCTION:FP_API,DH
DSA_free 209 EXIST::FUNCTION:DSA
DSA_generate_key 210 EXIST::FUNCTION:DSA
DSA_generate_parameters 211 EXIST::FUNCTION:DSA
@@ -301,8 +301,8 @@ EVP_des_ede_cfb 308 EXIST::FUNCTION:DES
EVP_des_ede_ofb 309 EXIST::FUNCTION:DES
EVP_des_ofb 310 EXIST::FUNCTION:DES
EVP_desx_cbc 311 EXIST::FUNCTION:DES
-EVP_dss 312 EXIST::FUNCTION:DSA,SHA
-EVP_dss1 313 EXIST::FUNCTION:DSA,SHA
+EVP_dss 312 EXIST::FUNCTION:SHA,DSA
+EVP_dss1 313 EXIST::FUNCTION:SHA,DSA
EVP_enc_null 314 EXIST::FUNCTION:
EVP_get_cipherbyname 315 EXIST::FUNCTION:
EVP_get_digestbyname 316 EXIST::FUNCTION:
@@ -477,8 +477,8 @@ RSA_free 484 EXIST::FUNCTION:RSA
RSA_generate_key 485 EXIST::FUNCTION:RSA
RSA_new 486 EXIST::FUNCTION:RSA
RSA_new_method 487 EXIST::FUNCTION:RSA
-RSA_print 488 EXIST::FUNCTION:BIO,RSA
-RSA_print_fp 489 EXIST::FUNCTION:RSA,FP_API
+RSA_print 488 EXIST::FUNCTION:RSA,BIO
+RSA_print_fp 489 EXIST::FUNCTION:FP_API,RSA
RSA_private_decrypt 490 EXIST::FUNCTION:RSA
RSA_private_encrypt 491 EXIST::FUNCTION:RSA
RSA_public_decrypt 492 EXIST::FUNCTION:RSA
@@ -489,14 +489,14 @@ RSA_sign_ASN1_OCTET_STRING 496 EXIST::FUNCTION:RSA
RSA_size 497 EXIST::FUNCTION:RSA
RSA_verify 498 EXIST::FUNCTION:RSA
RSA_verify_ASN1_OCTET_STRING 499 EXIST::FUNCTION:RSA
-SHA 500 EXIST::FUNCTION:SHA0,SHA
+SHA 500 EXIST::FUNCTION:SHA,SHA0
SHA1 501 EXIST::FUNCTION:SHA,SHA1
SHA1_Final 502 EXIST::FUNCTION:SHA,SHA1
SHA1_Init 503 EXIST::FUNCTION:SHA,SHA1
SHA1_Update 504 EXIST::FUNCTION:SHA,SHA1
-SHA_Final 505 EXIST::FUNCTION:SHA0,SHA
-SHA_Init 506 EXIST::FUNCTION:SHA0,SHA
-SHA_Update 507 EXIST::FUNCTION:SHA0,SHA
+SHA_Final 505 EXIST::FUNCTION:SHA,SHA0
+SHA_Init 506 EXIST::FUNCTION:SHA,SHA0
+SHA_Update 507 EXIST::FUNCTION:SHA,SHA0
OpenSSL_add_all_algorithms 508 EXIST::FUNCTION:
OpenSSL_add_all_ciphers 509 EXIST::FUNCTION:
OpenSSL_add_all_digests 510 EXIST::FUNCTION:
@@ -741,8 +741,8 @@ d2i_PKCS7_fp 747 EXIST::FUNCTION:FP_API
d2i_PrivateKey 748 EXIST::FUNCTION:
d2i_PublicKey 749 EXIST::FUNCTION:
d2i_RSAPrivateKey 750 EXIST::FUNCTION:RSA
-d2i_RSAPrivateKey_bio 751 EXIST::FUNCTION:BIO,RSA
-d2i_RSAPrivateKey_fp 752 EXIST::FUNCTION:RSA,FP_API
+d2i_RSAPrivateKey_bio 751 EXIST::FUNCTION:RSA,BIO
+d2i_RSAPrivateKey_fp 752 EXIST::FUNCTION:FP_API,RSA
d2i_RSAPublicKey 753 EXIST::FUNCTION:RSA
d2i_X509 754 EXIST::FUNCTION:
d2i_X509_ALGOR 755 EXIST::FUNCTION:
@@ -843,8 +843,8 @@ i2d_PKCS7_fp 850 EXIST::FUNCTION:FP_API
i2d_PrivateKey 851 EXIST::FUNCTION:
i2d_PublicKey 852 EXIST::FUNCTION:
i2d_RSAPrivateKey 853 EXIST::FUNCTION:RSA
-i2d_RSAPrivateKey_bio 854 EXIST::FUNCTION:BIO,RSA
-i2d_RSAPrivateKey_fp 855 EXIST::FUNCTION:RSA,FP_API
+i2d_RSAPrivateKey_bio 854 EXIST::FUNCTION:RSA,BIO
+i2d_RSAPrivateKey_fp 855 EXIST::FUNCTION:FP_API,RSA
i2d_RSAPublicKey 856 EXIST::FUNCTION:RSA
i2d_X509 857 EXIST::FUNCTION:
i2d_X509_ALGOR 858 EXIST::FUNCTION:
@@ -929,12 +929,12 @@ EVP_delete_alias 941 NOEXIST::FUNCTION:
EVP_mdc2 942 EXIST::FUNCTION:MDC2
PEM_read_bio_RSAPublicKey 943 EXIST::FUNCTION:RSA
PEM_write_bio_RSAPublicKey 944 EXIST::FUNCTION:RSA
-d2i_RSAPublicKey_bio 945 EXIST::FUNCTION:BIO,RSA
-i2d_RSAPublicKey_bio 946 EXIST::FUNCTION:BIO,RSA
+d2i_RSAPublicKey_bio 945 EXIST::FUNCTION:RSA,BIO
+i2d_RSAPublicKey_bio 946 EXIST::FUNCTION:RSA,BIO
PEM_read_RSAPublicKey 947 EXIST:!WIN16:FUNCTION:RSA
PEM_write_RSAPublicKey 949 EXIST:!WIN16:FUNCTION:RSA
-d2i_RSAPublicKey_fp 952 EXIST::FUNCTION:RSA,FP_API
-i2d_RSAPublicKey_fp 954 EXIST::FUNCTION:RSA,FP_API
+d2i_RSAPublicKey_fp 952 EXIST::FUNCTION:FP_API,RSA
+i2d_RSAPublicKey_fp 954 EXIST::FUNCTION:FP_API,RSA
BIO_copy_next_retry 955 EXIST::FUNCTION:
RSA_flags 956 EXIST::FUNCTION:RSA
X509_STORE_add_crl 957 EXIST::FUNCTION:
@@ -989,7 +989,7 @@ ERR_load_CRYPTOlib_strings 1009 EXIST:WIN16,VMS:FUNCTION:
EVP_PKEY_bits 1010 EXIST::FUNCTION:
MD5_Transform 1011 EXIST::FUNCTION:MD5
SHA1_Transform 1012 EXIST::FUNCTION:SHA,SHA1
-SHA_Transform 1013 EXIST::FUNCTION:SHA0,SHA
+SHA_Transform 1013 EXIST::FUNCTION:SHA,SHA0
X509_STORE_CTX_get_chain 1014 EXIST::FUNCTION:
X509_STORE_CTX_get_current_cert 1015 EXIST::FUNCTION:
X509_STORE_CTX_get_error 1016 EXIST::FUNCTION:
@@ -1216,7 +1216,7 @@ name_cmp 1239 EXIST::FUNCTION:
str_dup 1240 NOEXIST::FUNCTION:
i2s_ASN1_ENUMERATED 1241 EXIST::FUNCTION:
i2s_ASN1_ENUMERATED_TABLE 1242 EXIST::FUNCTION:
-BIO_s_log 1243 EXIST:!WIN32,!WIN16,!macintosh:FUNCTION:
+BIO_s_log 1243 EXIST:!WIN16,!WIN32,!macintosh:FUNCTION:
BIO_f_reliable 1244 EXIST::FUNCTION:BIO
PKCS7_dataFinal 1245 EXIST::FUNCTION:
PKCS7_dataDecode 1246 EXIST::FUNCTION:
@@ -1543,7 +1543,7 @@ ASN1_STRING_set_default_mask_asc 1960 EXIST:!VMS:FUNCTION:
ASN1_STRING_set_def_mask_asc 1960 EXIST:VMS:FUNCTION:
PEM_write_bio_RSA_PUBKEY 1961 EXIST::FUNCTION:RSA
ASN1_INTEGER_cmp 1963 EXIST::FUNCTION:
-d2i_RSA_PUBKEY_fp 1964 EXIST::FUNCTION:RSA,FP_API
+d2i_RSA_PUBKEY_fp 1964 EXIST::FUNCTION:FP_API,RSA
X509_trust_set_bit_asc 1967 NOEXIST::FUNCTION:
PEM_write_bio_DSA_PUBKEY 1968 EXIST::FUNCTION:DSA
X509_STORE_CTX_free 1969 EXIST::FUNCTION:
@@ -1558,7 +1558,7 @@ d2i_X509_AUX 1980 EXIST::FUNCTION:
i2d_DSA_PUBKEY 1981 EXIST::FUNCTION:DSA
X509_CERT_AUX_print 1982 EXIST::FUNCTION:BIO
PEM_read_DSA_PUBKEY 1984 EXIST:!WIN16:FUNCTION:DSA
-i2d_RSA_PUBKEY_bio 1985 EXIST::FUNCTION:BIO,RSA
+i2d_RSA_PUBKEY_bio 1985 EXIST::FUNCTION:RSA,BIO
ASN1_BIT_STRING_num_asc 1986 EXIST::FUNCTION:
i2d_PUBKEY 1987 EXIST::FUNCTION:
ASN1_UTCTIME_free 1988 EXIST::FUNCTION:
@@ -1606,7 +1606,7 @@ ASN1_IA5STRING_new 2049 EXIST::FUNCTION:
d2i_DSA_PUBKEY 2050 EXIST::FUNCTION:DSA
X509_check_purpose 2051 EXIST::FUNCTION:
ASN1_ENUMERATED_new 2052 EXIST::FUNCTION:
-d2i_RSA_PUBKEY_bio 2053 EXIST::FUNCTION:BIO,RSA
+d2i_RSA_PUBKEY_bio 2053 EXIST::FUNCTION:RSA,BIO
d2i_PUBKEY 2054 EXIST::FUNCTION:
X509_TRUST_get_trust 2055 EXIST::FUNCTION:
X509_TRUST_get_flags 2056 EXIST::FUNCTION:
@@ -1646,7 +1646,7 @@ ASN1_BIT_STRING_set 2109 EXIST::FUNCTION:
X509_TRUST_get_count 2110 EXIST::FUNCTION:
ASN1_INTEGER_free 2111 EXIST::FUNCTION:
OTHERNAME_free 2112 EXIST::FUNCTION:
-i2d_RSA_PUBKEY_fp 2113 EXIST::FUNCTION:RSA,FP_API
+i2d_RSA_PUBKEY_fp 2113 EXIST::FUNCTION:FP_API,RSA
ASN1_INTEGER_dup 2114 EXIST::FUNCTION:
d2i_X509_CERT_AUX 2115 EXIST::FUNCTION:
PEM_write_bio_PUBKEY 2117 EXIST::FUNCTION:
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index ff0dbecc45..b23671bb40 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -196,28 +196,28 @@ $inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def;
$bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq ''));
-$cflags.=" -DNO_IDEA" if $no_idea;
-$cflags.=" -DNO_RC2" if $no_rc2;
-$cflags.=" -DNO_RC4" if $no_rc4;
-$cflags.=" -DNO_RC5" if $no_rc5;
-$cflags.=" -DNO_MD2" if $no_md2;
-$cflags.=" -DNO_MD4" if $no_md4;
-$cflags.=" -DNO_MD5" if $no_md5;
-$cflags.=" -DNO_SHA" if $no_sha;
-$cflags.=" -DNO_SHA1" if $no_sha1;
-$cflags.=" -DNO_RIPEMD" if $no_rmd160;
-$cflags.=" -DNO_MDC2" if $no_mdc2;
-$cflags.=" -DNO_BF" if $no_bf;
-$cflags.=" -DNO_CAST" if $no_cast;
-$cflags.=" -DNO_DES" if $no_des;
-$cflags.=" -DNO_RSA" if $no_rsa;
-$cflags.=" -DNO_DSA" if $no_dsa;
-$cflags.=" -DNO_DH" if $no_dh;
-$cflags.=" -DNO_SOCK" if $no_sock;
-$cflags.=" -DNO_SSL2" if $no_ssl2;
-$cflags.=" -DNO_SSL3" if $no_ssl3;
-$cflags.=" -DNO_ERR" if $no_err;
-$cflags.=" -DNO_KRB5" if $no_krb5;
+$cflags.=" -DOPENSSL_NO_IDEA" if $no_idea;
+$cflags.=" -DOPENSSL_NO_RC2" if $no_rc2;
+$cflags.=" -DOPENSSL_NO_RC4" if $no_rc4;
+$cflags.=" -DOPENSSL_NO_RC5" if $no_rc5;
+$cflags.=" -DOPENSSL_NO_MD2" if $no_md2;
+$cflags.=" -DOPENSSL_NO_MD4" if $no_md4;
+$cflags.=" -DOPENSSL_NO_MD5" if $no_md5;
+$cflags.=" -DOPENSSL_NO_SHA" if $no_sha;
+$cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1;
+$cflags.=" -DOPENSSL_NO_RIPEMD" if $no_rmd160;
+$cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2;
+$cflags.=" -DOPENSSL_NO_BF" if $no_bf;
+$cflags.=" -DOPENSSL_NO_CAST" if $no_cast;
+$cflags.=" -DOPENSSL_NO_DES" if $no_des;
+$cflags.=" -DOPENSSL_NO_RSA" if $no_rsa;
+$cflags.=" -DOPENSSL_NO_DSA" if $no_dsa;
+$cflags.=" -DOPENSSL_NO_DH" if $no_dh;
+$cflags.=" -DOPENSSL_NO_SOCK" if $no_sock;
+$cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
+$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
+$cflags.=" -DOPENSSL_NO_ERR" if $no_err;
+$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
#$cflags.=" -DRSAref" if $rsaref ne "";
## if ($unix)
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 995e1dd27d..104751fb17 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -315,8 +315,8 @@ sub do_defs
open(IN,"<$file") || die "unable to open $file:$!\n";
my $line = "", my $def= "";
my %tag = (
- (map { $_ => 0 } @known_platforms),
- (map { "NO_".$_ => 0 } @known_algorithms),
+ (map { "OPENSSL_SYS_".$_ => 0 } @known_platforms),
+ (map { "OPENSSL_NO_".$_ => 0 } @known_algorithms),
NOPROTO => 0,
PERL5 => 0,
_WINDLL => 0,
@@ -361,7 +361,7 @@ sub do_defs
push(@tag,$1);
$tag{$1}=1;
} elsif (/^\#\s*error\s+(\w+) is disabled\./) {
- if ($tag[$#tag] eq "NO_".$1) {
+ if ($tag[$#tag] eq "OPENSSL_NO_".$1) {
$tag{$tag[$#tag]}=2;
}
} elsif (/^\#\s*endif/) {
@@ -373,7 +373,7 @@ sub do_defs
$tag{$tag[$#tag]}=0;
}
pop(@tag);
- if ($oldtag =~ /^NO_([A-Z0-9_]+)$/) {
+ if ($oldtag =~ /^OPENSSL_NO_([A-Z0-9_]+)$/) {
$oldtag=$1;
} else {
$oldtag="";
@@ -398,21 +398,22 @@ sub do_defs
&& $symhacking) {
my $s = $1;
my $a =
- $2.":".join(",", grep(!/^$/,
- map { $tag{$_} == 1 ?
- $_ : "" }
- @known_platforms));
+ $2.":".join(",",
+ grep(!/^$/,
+ map { $tag{"OPENSSL_SYS_".$_} == 1 ?
+ $_ : "" }
+ @known_platforms));
$rename{$s} = $a;
}
if (/^\#/) {
@current_platforms =
grep(!/^$/,
- map { $tag{$_} == 1 ? $_ :
- $tag{$_} == -1 ? "!".$_ : "" }
+ map { $tag{"OPENSSL_SYS_".$_} == 1 ? $_ :
+ $tag{"OPENSSL_SYS_".$_} == -1 ? "!".$_ : "" }
@known_platforms);
@current_algorithms =
grep(!/^$/,
- map { $tag{"NO_".$_} == -1 ? $_ : "" }
+ map { $tag{"OPENSSL_NO_".$_} == -1 ? $_ : "" }
@known_algorithms);
$def .=
"#INFO:"
@@ -724,7 +725,7 @@ sub print_test_file
(my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/;
if ($s ne $prev) {
if (!defined($nums{$s})) {
- printf STDERR "Warning: $s does not have a number assigned\n"
+ print STDERR "Warning: $s does not have a number assigned\n"
if(!$do_update);
} else {
$n=$nums{$s};
@@ -938,6 +939,7 @@ sub rewrite_numbers
my @s=sort { &parse_number($nums{$a},"n") <=> &parse_number($nums{$b},"n") } keys %nums;
foreach $sym (@s) {
(my $n, my $i) = split /\\/, $nums{$sym};
+ #print STDERR "DEBUG: rewrite_numbers for sym = ",$sym,": i = ",$i,", n = ",$n,", rsym{sym} = ",$rsyms{$sym},"syms{sym} = ",$syms{$sym},"\n";
next if defined($i) && $i =~ /^.*?:.*?:\w+\(\w+\)/;
next if defined($rsyms{$sym});
$i="NOEXIST::FUNCTION:"
diff --git a/util/pl/BC-16.pl b/util/pl/BC-16.pl
index 6c6df4fe0b..2033f524ca 100644
--- a/util/pl/BC-16.pl
+++ b/util/pl/BC-16.pl
@@ -21,14 +21,14 @@ $lflags="$base_lflags";
if ($win16)
{
$shlib=1;
- $cflags.=" -DWINDOWS -DWIN16";
+ $cflags.=" -DOPENSSL_SYSNAME_WIN16";
$app_cflag="-W";
$lib_cflag="-WD";
$lflags.="/Twe";
}
else
{
- $cflags.=" -DMSDOS";
+ $cflags.=" -DOENSSL_SYSNAME_MSDOS";
$lflags.=" /Tde";
}
diff --git a/util/pl/BC-32.pl b/util/pl/BC-32.pl
index 45fb369bfc..78d60616a6 100644
--- a/util/pl/BC-32.pl
+++ b/util/pl/BC-32.pl
@@ -18,7 +18,7 @@ $out_def="out32";
$tmp_def="tmp32";
$inc_def="inc32";
#enable max error messages, disable most common warnings
-$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN -DDSO_WIN32 ";
+$cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 ";
if ($debug)
{
$cflags.="-Od -y -v -vi- -D_DEBUG";
diff --git a/util/pl/VC-16.pl b/util/pl/VC-16.pl
index d187610551..7cda5e67a9 100644
--- a/util/pl/VC-16.pl
+++ b/util/pl/VC-16.pl
@@ -33,7 +33,7 @@ $lflags="$base_lflags /STACK:20000";
if ($win16)
{
- $cflags.=" -DWINDOWS -DWIN16";
+ $cflags.=" -DOPENSSL_SYSNAME_WIN16";
$app_cflag="/Gw /FPi87";
$lib_cflag="/Gw";
$lib_cflag.=" -D_WINDLL -D_DLL" if $shlib;
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
index 64edfb7db7..50bfb34385 100644
--- a/util/pl/VC-32.pl
+++ b/util/pl/VC-32.pl
@@ -11,7 +11,7 @@ $rm='del';
# C compiler stuff
$cc='cl';
-$cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
+$cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
$lflags="/nologo /subsystem:console /machine:I386 /opt:ref";
$mlflags='';
@@ -21,11 +21,11 @@ $inc_def="inc32";
if ($debug)
{
- $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32";
+ $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DOPENSSL_SYSNAME_WIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32";
$lflags.=" /debug";
$mlflags.=' /debug';
}
-$cflags .= " -DWINNT" if $NT == 1;
+$cflags .= " -DOPENSSL_SYSNAME_WINNT" if $NT == 1;
$obj='.obj';
$ofile="/Fo";