This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[dummy merge]
[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
211win32_inet_addr
212win32_gethostbyname
213win32_inet_ntoa
214win32_htons
215win32_ntohs
216win32_htonl
68dc0745
PP
217win32_stat
218win32_errno
219win32_stderr
220win32_stdin
221win32_stdout
222win32_ferror
223win32_feof
224win32_strerror
225win32_fprintf
226win32_printf
227win32_vfprintf
228win32_fread
229win32_fwrite
230win32_fopen
231win32_fdopen
232win32_freopen
233win32_fclose
234win32_fputs
235win32_fputc
236win32_ungetc
237win32_getc
238win32_fileno
239win32_clearerr
240win32_fflush
241win32_ftell
242win32_fseek
243win32_fgetpos
244win32_fsetpos
245win32_rewind
246win32_tmpfile
247win32_abort
248win32_fstat
249win32_pipe
250win32_popen
251win32_pclose
252win32_setmode
253win32_open
254win32_close
255win32_dup
256win32_dup2
257win32_read
258win32_write
259win32_spawnvpe
260win32_spawnle