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