3 # Written: 10 April 1996 Gary Ng (71564.1743@compuserve.com)
5 # Create the export list for perl.
6 # Needed by WIN32 for creating perl.dll
7 # based on perl_exp.SH in the main perl distribution directory
9 # This simple program relys on 'global.sym' being up to date
10 # with all of the global symbols that a dynamicly link library
11 # might want to access.
13 # There is some symbol defined in global.sym and interp.sym
14 # that does not present in the WIN32 port but there is no easy
15 # way to find them so I just put a exception list here
17 my $CCTYPE = shift || "MSVC";
19 $skip_sym=<<'!END!OF!SKIP!';
100 Perl_scan_inputsymbol
115 Perl_too_few_arguments
116 Perl_too_many_arguments
146 # All symbols have a Perl_ prefix because that's what embed.h
147 # sticks in front of them.
150 print "LIBRARY Perl\n";
151 print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
152 print "CODE LOADONCALL\n";
153 print "DATA LOADONCALL NONSHARED MULTIPLE\n";
156 open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
159 next if (!/^[A-Za-z]/);
160 next if (/_amg[ \t]*$/);
162 next if ($skip_sym =~ m/$symbol/m);
163 emit_symbol($symbol);
167 # also add symbols from interp.sym
168 # They are only needed if -DMULTIPLICITY is not set but it
169 # doesn't hurt to include them anyway.
170 # these don't have Perl prefix
172 open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
175 next if (!/^[A-Za-z]/);
176 next if (/_amg[ \t]*$/);
178 next if ($skip_sym =~ m/$symbol/m);
180 emit_symbol("Perl_" . $symbol);
187 next if (!/^[A-Za-z]/);
190 next if ($skip_sym =~ m/^$symbol/m);
191 emit_symbol($symbol);
197 if ($CCTYPE eq "BORLAND") {
198 # workaround Borland quirk by exporting both the straight
199 # name and a name with leading underscore. Note the
200 # alias *must* come after the symbol itself, if both
201 # are to be exported. (Linker bug?)
202 print "\t_$symbol\n";
203 print "\t$symbol = _$symbol\n";
206 # for binary coexistence, export both the symbol and
207 # alias with leading underscore
209 print "\t_$symbol = $symbol\n";
215 # extra globals not included above.
314 win32_getprotobynumber