summaryrefslogtreecommitdiffstats
path: root/util/mkdef.pl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-06-29 21:09:52 +0200
committerRichard Levitte <levitte@openssl.org>2017-06-29 21:19:53 +0200
commit9c06cf04ee9aa6682e6cc635aeb453ac12e641c1 (patch)
tree6e2b1a181994f66c4acc58221a8c85218d371477 /util/mkdef.pl
parentAdd sha/asm/keccak1600-s390x.pl. (diff)
downloadopenssl-9c06cf04ee9aa6682e6cc635aeb453ac12e641c1.tar.xz
openssl-9c06cf04ee9aa6682e6cc635aeb453ac12e641c1.zip
util/mkdef.pl: Add UNIX as a platform
This allows us to guard Unix specific functions with #ifndef / #ifdef OPENSSL_SYS_UNIX Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3804)
Diffstat (limited to 'util/mkdef.pl')
-rwxr-xr-xutil/mkdef.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 0fdf965f7e..dc39be42b8 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -68,6 +68,7 @@ my $do_checkexist = 0;
my $VMS=0;
my $W32=0;
my $NT=0;
+my $UNIX=0;
my $linux=0;
# Set this to make typesafe STACK definitions appear in DEF
my $safe_stack_def = 0;
@@ -75,7 +76,7 @@ my $safe_stack_def = 0;
my @known_platforms = ( "__FreeBSD__", "PERL5",
"EXPORT_VAR_AS_FUNCTION", "ZLIB", "_WIN32"
);
-my @known_ossl_platforms = ( "VMS", "WIN32", "WINNT", "OS2" );
+my @known_ossl_platforms = ( "UNIX", "VMS", "WIN32", "WINNT", "OS2" );
my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
"CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
"SHA256", "SHA512", "RMD160",
@@ -165,6 +166,7 @@ foreach (@ARGV, split(/ /, $config{options}))
}
if ($_ eq "linux") {
$linux=1;
+ $UNIX=1;
}
$VMS=1 if $_ eq "VMS";
if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic"
@@ -1064,6 +1066,7 @@ sub is_valid
if ($platforms) {
# platforms
+ if ($keyword eq "UNIX" && $UNIX) { return 1; }
if ($keyword eq "VMS" && $VMS) { return 1; }
if ($keyword eq "WIN32" && $W32) { return 1; }
if ($keyword eq "_WIN32" && $W32) { return 1; }