# It does this by parsing the header files and looking for the
# prototyped functions: it then prunes the output.
#
-# Intermediary files are created, call libeay.num and ssleay.num,...
-# Previously, they had the following format:
-#
-# routine-name nnnn
-#
-# But that isn't enough for a number of reasons, the first on being that
-# this format is (needlessly) very Win32-centric, and even then...
-# One of the biggest problems is that there's no information about what
-# routines should actually be used, which varies with what crypto algorithms
-# are disabled. Also, some operating systems (for example VMS with VAX C)
-# need to keep track of the global variables as well as the functions.
-#
-# So, a remake of this script is done so as to include information on the
-# kind of symbol it is (function or variable) and what algorithms they're
-# part of. This will allow easy translating to .def files or the corresponding
-# file in other operating systems (a .opt file for VMS, possibly with a .mar
-# file).
-#
-# The format now becomes:
+# Intermediary files are created, call libeay.num and ssleay.num,
+# The format of these files is:
#
# routine-name nnnn info
#
# Unit testing
"UNIT_TEST",
# OCB mode
- "OCB");
+ "OCB",
+ # APPLINK (win build feature?)
+ "APPLINK"
+ );
my $options="";
open(IN,"<Makefile") || die "unable to open Makefile!\n";
$crypto.=" crypto/rand/rand.h";
$crypto.=" crypto/comp/comp.h" ; # unless $no_comp;
$crypto.=" crypto/ocsp/ocsp.h";
-$crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h";
+$crypto.=" crypto/ui/ui.h";
$crypto.=" crypto/krb5/krb5_asn.h";
#$crypto.=" crypto/store/store.h";
$crypto.=" crypto/pqueue/pqueue.h";
while(<IN>) {
if($parens > 0) {
#Inside a DECLARE_DEPRECATED
- $parens += count_parens($_);
+ $stored_multiline .= $_;
+ chomp $stored_multiline;
+ print STDERR "DEBUG: Continuing multiline DEPRECATED: $stored_multiline\n" if $debug;
+ $parens = count_parens($stored_multiline);
+ if ($parens == 0) {
+ $stored_multiline =~ /^\s*DECLARE_DEPRECATED\s*\(\s*(\w*(\s|\*|\w)*)/;
+ $def .= "$1(void);";
+ }
next;
}
if (/\/\* Error codes for the \w+ functions\. \*\//)
"EXPORT_VAR_AS_FUNCTION",
"FUNCTION");
} elsif (/^\s*DECLARE_DEPRECATED\s*\(\s*(\w*(\s|\*|\w)*)/) {
- $def .= "$1(void);";
$parens = count_parens($_);
- next;
+ if ($parens == 0) {
+ $def .= "$1(void);";
+ } else {
+ $stored_multiline = $_;
+ chomp $stored_multiline;
+ print STDERR "DEBUG: Found multiline DEPRECATED starting with: $stored_multiline\n" if $debug;
+ next;
+ }
} elsif ($tag{'CONST_STRICT'} != 1) {
if (/\{|\/\*|\([^\)]*$/) {
$line = $_;