Commit | Line | Data |
0a753a76 |
1 | #!../miniperl |
2 | |
3 | # Written: 10 April 1996 Gary Ng (71564.1743@compuserve.com) |
4 | |
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 |
8 | |
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. |
12 | |
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 exeception list here |
16 | |
3e3baf6d |
17 | my $CCTYPE = shift || "MSVC"; |
18 | |
0a753a76 |
19 | $skip_sym=<<'!END!OF!SKIP!'; |
20 | Perl_SvIV |
21 | Perl_SvNV |
22 | Perl_SvTRUE |
23 | Perl_SvUV |
24 | Perl_block_type |
25 | Perl_sv_pvn |
26 | Perl_additem |
27 | Perl_cast_ulong |
28 | Perl_check_uni |
29 | Perl_checkcomma |
30 | Perl_chsize |
31 | Perl_ck_aelem |
32 | Perl_cryptseen |
33 | Perl_cx_dump |
34 | Perl_deb |
35 | Perl_deb_growlevel |
36 | Perl_debop |
37 | Perl_debprofdump |
38 | Perl_debstack |
39 | Perl_debstackptrs |
40 | Perl_do_ipcctl |
41 | Perl_do_ipcget |
42 | Perl_do_msgrcv |
43 | Perl_do_msgsnd |
44 | Perl_do_semop |
45 | Perl_do_shmio |
46 | Perl_doeval |
47 | Perl_dofindlabel |
48 | Perl_dopoptoeval |
49 | Perl_dump_eval |
50 | Perl_dump_fds |
51 | Perl_dump_form |
52 | Perl_dump_gv |
53 | Perl_dump_mstats |
54 | Perl_dump_op |
55 | Perl_dump_packsubs |
56 | Perl_dump_pm |
57 | Perl_dump_sub |
58 | Perl_expectterm |
59 | Perl_fetch_gv |
60 | Perl_fetch_io |
61 | Perl_force_ident |
62 | Perl_force_next |
63 | Perl_force_word |
64 | Perl_hv_stashpv |
65 | Perl_intuit_more |
66 | Perl_know_next |
67 | Perl_modkids |
68 | Perl_mstats |
69 | Perl_my_bzero |
70 | Perl_my_htonl |
71 | Perl_my_ntohl |
72 | Perl_my_swap |
73 | Perl_my_chsize |
74 | Perl_newXSUB |
75 | Perl_no_fh_allowed |
76 | Perl_no_op |
77 | Perl_nointrp |
78 | Perl_nomem |
79 | Perl_pp_cswitch |
80 | Perl_pp_entersubr |
81 | Perl_pp_evalonce |
82 | Perl_pp_interp |
83 | Perl_pp_map |
84 | Perl_pp_nswitch |
85 | Perl_q |
86 | Perl_reall_srchlen |
87 | Perl_regdump |
88 | Perl_regfold |
89 | Perl_regmyendp |
90 | Perl_regmyp_size |
91 | Perl_regmystartp |
92 | Perl_regnarrate |
93 | Perl_regprop |
94 | Perl_same_dirent |
95 | Perl_saw_return |
96 | Perl_scan_const |
97 | Perl_scan_formline |
98 | Perl_scan_heredoc |
99 | Perl_scan_ident |
100 | Perl_scan_inputsymbol |
101 | Perl_scan_pat |
102 | Perl_scan_prefix |
103 | Perl_scan_str |
104 | Perl_scan_subst |
105 | Perl_scan_trans |
106 | Perl_scan_word |
68dc0745 |
107 | Perl_setenv_getix |
0a753a76 |
108 | Perl_skipspace |
109 | Perl_sublex_done |
110 | Perl_sublex_start |
111 | Perl_sv_peek |
112 | Perl_sv_ref |
113 | Perl_sv_setptrobj |
114 | Perl_timesbuf |
115 | Perl_too_few_arguments |
116 | Perl_too_many_arguments |
117 | Perl_unlnk |
118 | Perl_wait4pid |
119 | Perl_watch |
120 | Perl_yyname |
121 | Perl_yyrule |
122 | allgvs |
123 | curblock |
0a753a76 |
124 | curcsv |
0a753a76 |
125 | lastretstr |
126 | mystack_mark |
127 | perl_init_ext |
128 | perl_requirepv |
0a753a76 |
129 | stack |
ff0cee69 |
130 | statusvalue_vms |
0a753a76 |
131 | Perl_safexcalloc |
132 | Perl_safexmalloc |
133 | Perl_safexfree |
134 | Perl_safexrealloc |
68dc0745 |
135 | Perl_my_memcmp |
8b10511d |
136 | Perl_my_memset |
68dc0745 |
137 | Perl_cshlen |
138 | Perl_cshname |
0a753a76 |
139 | !END!OF!SKIP! |
140 | |
141 | # All symbols have a Perl_ prefix because that's what embed.h |
142 | # sticks in front of them. |
143 | |
144 | |
145 | print "LIBRARY Perl\n"; |
146 | print "DESCRIPTION 'Perl interpreter, export autogenerated'\n"; |
147 | print "CODE LOADONCALL\n"; |
148 | print "DATA LOADONCALL NONSHARED MULTIPLE\n"; |
149 | print "EXPORTS\n"; |
150 | |
151 | open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!; |
152 | while (<GLOBAL>) { |
153 | my $symbol; |
154 | next if (!/^[A-Za-z]/); |
155 | next if (/_amg[ \t]*$/); |
156 | $symbol = "Perl_$_"; |
157 | next if ($skip_sym =~ m/$symbol/m); |
3e3baf6d |
158 | emit_symbol($symbol); |
159 | } |
0a753a76 |
160 | close(GLOBAL); |
161 | |
162 | # also add symbols from interp.sym |
163 | # They are only needed if -DMULTIPLICITY is not set but it |
164 | # doesn't hurt to include them anyway. |
165 | # these don't have Perl prefix |
166 | |
167 | open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!; |
168 | while (<INTERP>) { |
169 | my $symbol; |
170 | next if (!/^[A-Za-z]/); |
171 | next if (/_amg[ \t]*$/); |
172 | $symbol = $_; |
173 | next if ($skip_sym =~ m/$symbol/m); |
174 | #print "\t$symbol"; |
3e3baf6d |
175 | emit_symbol("Perl_" . $symbol); |
176 | } |
0a753a76 |
177 | |
178 | #close(INTERP); |
179 | |
180 | while (<DATA>) { |
181 | my $symbol; |
182 | next if (!/^[A-Za-z]/); |
183 | next if (/^#/); |
184 | $symbol = $_; |
185 | next if ($skip_sym =~ m/^$symbol/m); |
3e3baf6d |
186 | emit_symbol($symbol); |
187 | } |
188 | |
189 | sub emit_symbol { |
190 | my $symbol = shift; |
191 | chomp $symbol; |
192 | if ($CCTYPE eq "BORLAND") { |
193 | # workaround Borland quirk by exporting both the straight |
194 | # name and a name with leading underscore |
195 | #print "\t$symbol = _$symbol\n"; |
196 | print "\t_$symbol\n"; |
197 | } |
198 | else { |
199 | print "\t$symbol\n"; |
200 | } |
201 | } |
0a753a76 |
202 | |
203 | 1; |
204 | __DATA__ |
205 | # extra globals not included above. |
206 | perl_init_i18nl10n |
207 | perl_init_ext |
208 | perl_alloc |
209 | perl_construct |
210 | perl_destruct |
211 | perl_free |
212 | perl_parse |
213 | perl_run |
214 | perl_get_sv |
215 | perl_get_av |
216 | perl_get_hv |
217 | perl_get_cv |
218 | perl_call_argv |
219 | perl_call_pv |
220 | perl_call_method |
221 | perl_call_sv |
10dd38fc |
222 | perl_require_pv |
223 | perl_eval_pv |
224 | perl_eval_sv |
d28b3ca3 |
225 | boot_DynaLoader |
68dc0745 |
226 | win32_errno |
96e4d5b1 |
227 | win32_environ |
68dc0745 |
228 | win32_stdin |
229 | win32_stdout |
96e4d5b1 |
230 | win32_stderr |
68dc0745 |
231 | win32_ferror |
232 | win32_feof |
233 | win32_strerror |
234 | win32_fprintf |
235 | win32_printf |
236 | win32_vfprintf |
96e4d5b1 |
237 | win32_vprintf |
68dc0745 |
238 | win32_fread |
239 | win32_fwrite |
240 | win32_fopen |
241 | win32_fdopen |
242 | win32_freopen |
243 | win32_fclose |
244 | win32_fputs |
245 | win32_fputc |
246 | win32_ungetc |
247 | win32_getc |
248 | win32_fileno |
249 | win32_clearerr |
250 | win32_fflush |
251 | win32_ftell |
252 | win32_fseek |
253 | win32_fgetpos |
254 | win32_fsetpos |
255 | win32_rewind |
256 | win32_tmpfile |
257 | win32_abort |
258 | win32_fstat |
96e4d5b1 |
259 | win32_stat |
68dc0745 |
260 | win32_pipe |
261 | win32_popen |
262 | win32_pclose |
263 | win32_setmode |
96e4d5b1 |
264 | win32_lseek |
265 | win32_tell |
68dc0745 |
266 | win32_dup |
267 | win32_dup2 |
96e4d5b1 |
268 | win32_open |
269 | win32_close |
270 | win32_eof |
68dc0745 |
271 | win32_read |
272 | win32_write |
3e3baf6d |
273 | win32_spawnvp |
5aabfad6 |
274 | win32_mkdir |
275 | win32_rmdir |
276 | win32_chdir |
c90c0ff4 |
277 | win32_flock |
54310121 |
278 | win32_htons |
279 | win32_ntohs |
280 | win32_htonl |
281 | win32_ntohl |
282 | win32_inet_addr |
283 | win32_inet_ntoa |
284 | win32_socket |
285 | win32_bind |
286 | win32_listen |
287 | win32_accept |
288 | win32_connect |
289 | win32_send |
290 | win32_sendto |
291 | win32_recv |
292 | win32_recvfrom |
293 | win32_shutdown |
294 | win32_ioctlsocket |
295 | win32_setsockopt |
296 | win32_getsockopt |
297 | win32_getpeername |
298 | win32_getsockname |
299 | win32_gethostname |
300 | win32_gethostbyname |
301 | win32_gethostbyaddr |
302 | win32_getprotobyname |
303 | win32_getprotobynumber |
304 | win32_getservbyname |
305 | win32_getservbyport |
306 | win32_select |
307 | win32_endhostent |
308 | win32_endnetent |
309 | win32_endprotoent |
310 | win32_endservent |
311 | win32_getnetent |
312 | win32_getnetbyname |
313 | win32_getnetbyaddr |
314 | win32_getprotoent |
315 | win32_getservent |
316 | win32_sethostent |
317 | win32_setnetent |
318 | win32_setprotoent |
319 | win32_setservent |