[inseparable changes from match from perl-5.003_97 to perl-5.003_97a]
[perl.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_cshlen
140 Perl_cshname
141 !END!OF!SKIP!
142
143 # All symbols have a Perl_ prefix because that's what embed.h
144 # sticks in front of them.
145
146
147 print "LIBRARY Perl\n";
148 print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
149 print "CODE LOADONCALL\n";
150 print "DATA LOADONCALL NONSHARED MULTIPLE\n";
151 print "EXPORTS\n";
152
153 open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
154 while (<GLOBAL>) {
155         my $symbol;
156         next if (!/^[A-Za-z]/);
157         next if (/_amg[ \t]*$/);
158         $symbol = "Perl_$_";
159         next if ($skip_sym =~ m/$symbol/m);
160         print "\t$symbol";
161         };
162 close(GLOBAL);
163
164 # also add symbols from interp.sym
165 # They are only needed if -DMULTIPLICITY is not set but it
166 # doesn't hurt to include them anyway.
167 # these don't have Perl prefix
168
169 open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
170 while (<INTERP>) {
171         my $symbol;
172         next if (!/^[A-Za-z]/);
173         next if (/_amg[ \t]*$/);
174         $symbol = $_;
175         next if ($skip_sym =~ m/$symbol/m);
176         #print "\t$symbol";
177         print "\tPerl_$symbol";
178         };
179
180 #close(INTERP);
181
182 while (<DATA>) {
183         my $symbol;
184         next if (!/^[A-Za-z]/);
185         next if (/^#/);
186         $symbol = $_;
187         next if ($skip_sym =~ m/^$symbol/m);
188         print "\t$symbol";
189         };
190
191 1;
192 __DATA__
193 # extra globals not included above.
194 perl_init_i18nl10n
195 perl_init_ext
196 perl_alloc
197 perl_construct
198 perl_destruct
199 perl_free
200 perl_parse
201 perl_run
202 perl_get_sv
203 perl_get_av
204 perl_get_hv
205 perl_get_cv
206 perl_call_argv
207 perl_call_pv
208 perl_call_method
209 perl_call_sv
210 perl_requirepv
211 win32_stat
212 win32_errno
213 win32_stderr
214 win32_stdin
215 win32_stdout
216 win32_ferror
217 win32_feof
218 win32_strerror
219 win32_fprintf
220 win32_printf
221 win32_vfprintf
222 win32_fread
223 win32_fwrite
224 win32_fopen
225 win32_fdopen
226 win32_freopen
227 win32_fclose
228 win32_fputs
229 win32_fputc
230 win32_ungetc
231 win32_getc
232 win32_fileno
233 win32_clearerr
234 win32_fflush
235 win32_ftell
236 win32_fseek
237 win32_fgetpos
238 win32_fsetpos
239 win32_rewind
240 win32_tmpfile
241 win32_abort
242 win32_fstat
243 win32_pipe
244 win32_popen
245 win32_pclose
246 win32_setmode
247 win32_open
248 win32_close
249 win32_dup
250 win32_dup2
251 win32_read
252 win32_write
253 win32_spawnvpe
254 win32_spawnle
255 win32_mkdir
256 win32_rmdir
257 win32_chdir
258 win32_htons
259 win32_ntohs
260 win32_htonl
261 win32_ntohl
262 win32_inet_addr
263 win32_inet_ntoa
264 win32_socket
265 win32_bind
266 win32_listen
267 win32_accept
268 win32_connect
269 win32_send
270 win32_sendto
271 win32_recv
272 win32_recvfrom
273 win32_shutdown
274 win32_ioctlsocket
275 win32_setsockopt
276 win32_getsockopt
277 win32_getpeername
278 win32_getsockname
279 win32_gethostname
280 win32_gethostbyname
281 win32_gethostbyaddr
282 win32_getprotobyname
283 win32_getprotobynumber
284 win32_getservbyname
285 win32_getservbyport
286 win32_select
287 win32_endhostent
288 win32_endnetent
289 win32_endprotoent
290 win32_endservent
291 win32_getnetent
292 win32_getnetbyname
293 win32_getnetbyaddr
294 win32_getprotoent
295 win32_getservent
296 win32_sethostent
297 win32_setnetent
298 win32_setprotoent
299 win32_setservent