This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[inseparable changes from patch from perl5.003_23 to perl5.003_24]
[perl5.git] / win32 / makedef.pl
CommitLineData
0a753a76 1
2#!../miniperl
3
4# Written: 10 April 1996 Gary Ng (71564.1743@compuserve.com)
5
6# Create the export list for perl.
7# Needed by WIN32 for creating perl.dll
8# based on perl_exp.SH in the main perl distribution directory
9
10# This simple program relys on 'global.sym' being up to date
11# with all of the global symbols that a dynamicly link library
12# might want to access.
13
14# There is some symbol defined in global.sym and interp.sym
15# that does not present in the WIN32 port but there is no easy
16# way to find them so I just put a exeception list here
17
18$skip_sym=<<'!END!OF!SKIP!';
19Perl_SvIV
20Perl_SvNV
21Perl_SvTRUE
22Perl_SvUV
23Perl_block_type
24Perl_sv_pvn
25Perl_additem
26Perl_cast_ulong
27Perl_check_uni
28Perl_checkcomma
29Perl_chsize
30Perl_ck_aelem
31Perl_cryptseen
32Perl_cx_dump
33Perl_deb
34Perl_deb_growlevel
35Perl_debop
36Perl_debprofdump
37Perl_debstack
38Perl_debstackptrs
39Perl_do_ipcctl
40Perl_do_ipcget
41Perl_do_msgrcv
42Perl_do_msgsnd
43Perl_do_semop
44Perl_do_shmio
45Perl_doeval
46Perl_dofindlabel
47Perl_dopoptoeval
48Perl_dump_eval
49Perl_dump_fds
50Perl_dump_form
51Perl_dump_gv
52Perl_dump_mstats
53Perl_dump_op
54Perl_dump_packsubs
55Perl_dump_pm
56Perl_dump_sub
57Perl_expectterm
58Perl_fetch_gv
59Perl_fetch_io
60Perl_force_ident
61Perl_force_next
62Perl_force_word
63Perl_hv_stashpv
64Perl_intuit_more
65Perl_know_next
66Perl_modkids
67Perl_mstats
68Perl_my_bzero
69Perl_my_htonl
70Perl_my_ntohl
71Perl_my_swap
72Perl_my_chsize
73Perl_newXSUB
74Perl_no_fh_allowed
75Perl_no_op
76Perl_nointrp
77Perl_nomem
78Perl_pp_cswitch
79Perl_pp_entersubr
80Perl_pp_evalonce
81Perl_pp_interp
82Perl_pp_map
83Perl_pp_nswitch
84Perl_q
85Perl_reall_srchlen
86Perl_regdump
87Perl_regfold
88Perl_regmyendp
89Perl_regmyp_size
90Perl_regmystartp
91Perl_regnarrate
92Perl_regprop
93Perl_same_dirent
94Perl_saw_return
95Perl_scan_const
96Perl_scan_formline
97Perl_scan_heredoc
98Perl_scan_ident
99Perl_scan_inputsymbol
100Perl_scan_pat
101Perl_scan_prefix
102Perl_scan_str
103Perl_scan_subst
104Perl_scan_trans
105Perl_scan_word
106Perl_skipspace
107Perl_sublex_done
108Perl_sublex_start
109Perl_sv_peek
110Perl_sv_ref
111Perl_sv_setptrobj
112Perl_timesbuf
113Perl_too_few_arguments
114Perl_too_many_arguments
115Perl_unlnk
116Perl_wait4pid
117Perl_watch
118Perl_yyname
119Perl_yyrule
120allgvs
121curblock
122curcop
123curcopdb
124curcsv
125envgv
126lastretstr
127mystack_mark
128perl_init_ext
129perl_requirepv
130siggv
131stack
132tainting
133Perl_safexcalloc
134Perl_safexmalloc
135Perl_safexfree
136Perl_safexrealloc
137!END!OF!SKIP!
138
139# All symbols have a Perl_ prefix because that's what embed.h
140# sticks in front of them.
141
142
143print "LIBRARY Perl\n";
144print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
145print "CODE LOADONCALL\n";
146print "DATA LOADONCALL NONSHARED MULTIPLE\n";
147print "EXPORTS\n";
148
149open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
150while (<GLOBAL>) {
151 my $symbol;
152 next if (!/^[A-Za-z]/);
153 next if (/_amg[ \t]*$/);
154 $symbol = "Perl_$_";
155 next if ($skip_sym =~ m/$symbol/m);
156 print "\t$symbol";
157 };
158close(GLOBAL);
159
160# also add symbols from interp.sym
161# They are only needed if -DMULTIPLICITY is not set but it
162# doesn't hurt to include them anyway.
163# these don't have Perl prefix
164
165open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
166while (<INTERP>) {
167 my $symbol;
168 next if (!/^[A-Za-z]/);
169 next if (/_amg[ \t]*$/);
170 $symbol = $_;
171 next if ($skip_sym =~ m/$symbol/m);
172 #print "\t$symbol";
173 print "\tPerl_$symbol";
174 };
175
176#close(INTERP);
177
178while (<DATA>) {
179 my $symbol;
180 next if (!/^[A-Za-z]/);
181 next if (/^#/);
182 $symbol = $_;
183 next if ($skip_sym =~ m/^$symbol/m);
184 print "\t$symbol";
185 };
186
1871;
188__DATA__
189# extra globals not included above.
190perl_init_i18nl10n
191perl_init_ext
192perl_alloc
193perl_construct
194perl_destruct
195perl_free
196perl_parse
197perl_run
198perl_get_sv
199perl_get_av
200perl_get_hv
201perl_get_cv
202perl_call_argv
203perl_call_pv
204perl_call_method
205perl_call_sv
206perl_requirepv
207win32_inet_addr
208win32_gethostbyname
209win32_inet_ntoa
210win32_htons
211win32_ntohs
212win32_htonl