This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Doc updates: INSTALL-1.13, pumpkin.pod-1.9
[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
PP
138Perl_my_memcmp
139Perl_cshlen
140Perl_cshname
0a753a76
PP
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
147print "LIBRARY Perl\n";
148print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
149print "CODE LOADONCALL\n";
150print "DATA LOADONCALL NONSHARED MULTIPLE\n";
151print "EXPORTS\n";
152
153open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
154while (<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 };
162close(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
169open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
170while (<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
182while (<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
1911;
192__DATA__
193# extra globals not included above.
194perl_init_i18nl10n
195perl_init_ext
196perl_alloc
197perl_construct
198perl_destruct
199perl_free
200perl_parse
201perl_run
202perl_get_sv
203perl_get_av
204perl_get_hv
205perl_get_cv
206perl_call_argv
207perl_call_pv
208perl_call_method
209perl_call_sv
210perl_requirepv
68dc0745
PP
211win32_stat
212win32_errno
213win32_stderr
214win32_stdin
215win32_stdout
216win32_ferror
217win32_feof
218win32_strerror
219win32_fprintf
220win32_printf
221win32_vfprintf
222win32_fread
223win32_fwrite
224win32_fopen
225win32_fdopen
226win32_freopen
227win32_fclose
228win32_fputs
229win32_fputc
230win32_ungetc
231win32_getc
232win32_fileno
233win32_clearerr
234win32_fflush
235win32_ftell
236win32_fseek
237win32_fgetpos
238win32_fsetpos
239win32_rewind
240win32_tmpfile
241win32_abort
242win32_fstat
243win32_pipe
244win32_popen
245win32_pclose
246win32_setmode
247win32_open
248win32_close
249win32_dup
250win32_dup2
251win32_read
252win32_write
253win32_spawnvpe
254win32_spawnle
5aabfad6
PP
255win32_mkdir
256win32_rmdir
257win32_chdir
54310121
PP
258win32_htons
259win32_ntohs
260win32_htonl
261win32_ntohl
262win32_inet_addr
263win32_inet_ntoa
264win32_socket
265win32_bind
266win32_listen
267win32_accept
268win32_connect
269win32_send
270win32_sendto
271win32_recv
272win32_recvfrom
273win32_shutdown
274win32_ioctlsocket
275win32_setsockopt
276win32_getsockopt
277win32_getpeername
278win32_getsockname
279win32_gethostname
280win32_gethostbyname
281win32_gethostbyaddr
282win32_getprotobyname
283win32_getprotobynumber
284win32_getservbyname
285win32_getservbyport
286win32_select
287win32_endhostent
288win32_endnetent
289win32_endprotoent
290win32_endservent
291win32_getnetent
292win32_getnetbyname
293win32_getnetbyaddr
294win32_getprotoent
295win32_getservent
296win32_sethostent
297win32_setnetent
298win32_setprotoent
299win32_setservent