This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[inseparable changes from changes to perl-5.004_01-mt2]
[perl5.git] / win32 / makedef.pl
CommitLineData
0a753a76
PP
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!';
18Perl_SvIV
19Perl_SvNV
20Perl_SvTRUE
21Perl_SvUV
22Perl_block_type
23Perl_sv_pvn
24Perl_additem
25Perl_cast_ulong
26Perl_check_uni
27Perl_checkcomma
28Perl_chsize
29Perl_ck_aelem
30Perl_cryptseen
31Perl_cx_dump
32Perl_deb
33Perl_deb_growlevel
34Perl_debop
35Perl_debprofdump
36Perl_debstack
37Perl_debstackptrs
38Perl_do_ipcctl
39Perl_do_ipcget
40Perl_do_msgrcv
41Perl_do_msgsnd
42Perl_do_semop
43Perl_do_shmio
44Perl_doeval
45Perl_dofindlabel
46Perl_dopoptoeval
47Perl_dump_eval
48Perl_dump_fds
49Perl_dump_form
50Perl_dump_gv
51Perl_dump_mstats
52Perl_dump_op
53Perl_dump_packsubs
54Perl_dump_pm
55Perl_dump_sub
56Perl_expectterm
57Perl_fetch_gv
58Perl_fetch_io
59Perl_force_ident
60Perl_force_next
61Perl_force_word
62Perl_hv_stashpv
63Perl_intuit_more
64Perl_know_next
65Perl_modkids
66Perl_mstats
67Perl_my_bzero
68Perl_my_htonl
69Perl_my_ntohl
70Perl_my_swap
71Perl_my_chsize
72Perl_newXSUB
73Perl_no_fh_allowed
74Perl_no_op
75Perl_nointrp
76Perl_nomem
77Perl_pp_cswitch
78Perl_pp_entersubr
79Perl_pp_evalonce
80Perl_pp_interp
81Perl_pp_map
82Perl_pp_nswitch
83Perl_q
84Perl_reall_srchlen
85Perl_regdump
86Perl_regfold
87Perl_regmyendp
88Perl_regmyp_size
89Perl_regmystartp
90Perl_regnarrate
91Perl_regprop
92Perl_same_dirent
93Perl_saw_return
94Perl_scan_const
95Perl_scan_formline
96Perl_scan_heredoc
97Perl_scan_ident
98Perl_scan_inputsymbol
99Perl_scan_pat
100Perl_scan_prefix
101Perl_scan_str
102Perl_scan_subst
103Perl_scan_trans
104Perl_scan_word
68dc0745 105Perl_setenv_getix
0a753a76
PP
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
ff0cee69 132statusvalue_vms
0a753a76
PP
133tainting
134Perl_safexcalloc
135Perl_safexmalloc
136Perl_safexfree
137Perl_safexrealloc
68dc0745 138Perl_my_memcmp
8b10511d 139Perl_my_memset
68dc0745
PP
140Perl_cshlen
141Perl_cshname
0a753a76
PP
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
148print "LIBRARY Perl\n";
149print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
150print "CODE LOADONCALL\n";
151print "DATA LOADONCALL NONSHARED MULTIPLE\n";
152print "EXPORTS\n";
153
154open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
155while (<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 };
163close(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
170open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
171while (<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
183while (<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
1921;
193__DATA__
194# extra globals not included above.
195perl_init_i18nl10n
196perl_init_ext
197perl_alloc
198perl_construct
199perl_destruct
200perl_free
201perl_parse
202perl_run
203perl_get_sv
204perl_get_av
205perl_get_hv
206perl_get_cv
207perl_call_argv
208perl_call_pv
209perl_call_method
210perl_call_sv
10dd38fc
GS
211perl_require_pv
212perl_eval_pv
213perl_eval_sv
d28b3ca3 214boot_DynaLoader
68dc0745 215win32_errno
96e4d5b1 216win32_environ
68dc0745
PP
217win32_stdin
218win32_stdout
96e4d5b1 219win32_stderr
68dc0745
PP
220win32_ferror
221win32_feof
222win32_strerror
223win32_fprintf
224win32_printf
225win32_vfprintf
96e4d5b1 226win32_vprintf
68dc0745
PP
227win32_fread
228win32_fwrite
229win32_fopen
230win32_fdopen
231win32_freopen
232win32_fclose
233win32_fputs
234win32_fputc
235win32_ungetc
236win32_getc
237win32_fileno
238win32_clearerr
239win32_fflush
240win32_ftell
241win32_fseek
242win32_fgetpos
243win32_fsetpos
244win32_rewind
245win32_tmpfile
246win32_abort
247win32_fstat
96e4d5b1 248win32_stat
68dc0745
PP
249win32_pipe
250win32_popen
251win32_pclose
252win32_setmode
96e4d5b1
PP
253win32_lseek
254win32_tell
68dc0745
PP
255win32_dup
256win32_dup2
96e4d5b1
PP
257win32_open
258win32_close
259win32_eof
68dc0745
PP
260win32_read
261win32_write
262win32_spawnvpe
263win32_spawnle
5aabfad6
PP
264win32_mkdir
265win32_rmdir
266win32_chdir
c90c0ff4 267win32_flock
54310121
PP
268win32_htons
269win32_ntohs
270win32_htonl
271win32_ntohl
272win32_inet_addr
273win32_inet_ntoa
274win32_socket
275win32_bind
276win32_listen
277win32_accept
278win32_connect
279win32_send
280win32_sendto
281win32_recv
282win32_recvfrom
283win32_shutdown
284win32_ioctlsocket
285win32_setsockopt
286win32_getsockopt
287win32_getpeername
288win32_getsockname
289win32_gethostname
290win32_gethostbyname
291win32_gethostbyaddr
292win32_getprotobyname
293win32_getprotobynumber
294win32_getservbyname
295win32_getservbyport
296win32_select
297win32_endhostent
298win32_endnetent
299win32_endprotoent
300win32_endservent
301win32_getnetent
302win32_getnetbyname
303win32_getnetbyaddr
304win32_getprotoent
305win32_getservent
306win32_sethostent
307win32_setnetent
308win32_setprotoent
309win32_setservent