apps/progs.pl: add back the INCLUDE_FUNCTION_TABLE wrapper
authorRichard Levitte <levitte@openssl.org>
Sat, 19 Mar 2016 19:03:56 +0000 (20:03 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 19 Mar 2016 21:19:12 +0000 (22:19 +0100)
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
apps/progs.pl

index 50b6cee53f2c2d08548f251d8cd9c7137499f3bc..669e82b9408bc47860605e3c8232174aefb6953a 100644 (file)
@@ -67,6 +67,8 @@ foreach (@ARGV) {
        printf "extern OPTIONS %s_options[];\n", $_;
 }
 
+print "\n#ifdef INCLUDE_FUNCTION_TABLE\n";
+print "static FUNCTION functions[] = {\n";
 my %cmd_disabler = (
     ciphers  => "sock",
     genrsa   => "rsa",
@@ -78,7 +80,6 @@ my %cmd_disabler = (
     ecparam  => "ec",
     pkcs12   => "des",
     );
-print "\nstatic FUNCTION functions[] = {\n";
 foreach my $cmd (@ARGV) {
        my $str="    { FT_general, \"$cmd\", ${cmd}_main, ${cmd}_options },\n";
        if ($cmd =~ /^s_/) {
@@ -157,3 +158,4 @@ foreach my $cmd (
 }
 
 print "    { 0, NULL, NULL}\n};\n";
+print "#endif\n";