This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Inline PI function
[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
105Perl_skipspace
106Perl_sublex_done
107Perl_sublex_start
108Perl_sv_peek
109Perl_sv_ref
110Perl_sv_setptrobj
111Perl_timesbuf
112Perl_too_few_arguments
113Perl_too_many_arguments
114Perl_unlnk
115Perl_wait4pid
116Perl_watch
117Perl_yyname
118Perl_yyrule
119allgvs
120curblock
121curcop
122curcopdb
123curcsv
124envgv
125lastretstr
126mystack_mark
127perl_init_ext
128perl_requirepv
129siggv
130stack
ff0cee69 131statusvalue_vms
0a753a76
PP
132tainting
133Perl_safexcalloc
134Perl_safexmalloc
135Perl_safexfree
136Perl_safexrealloc
137!END!OF!SKIP!
138
139# All symbols have a Perl_ prefix because that's what embed.h
140# sticks in front of them.
141
142
143print "LIBRARY Perl\n";
144print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
145print "CODE LOADONCALL\n";
146print "DATA LOADONCALL NONSHARED MULTIPLE\n";
147print "EXPORTS\n";
148
149open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
150while (<GLOBAL>) {
151 my $symbol;
152 next if (!/^[A-Za-z]/);
153 next if (/_amg[ \t]*$/);
154 $symbol = "Perl_$_";
155 next if ($skip_sym =~ m/$symbol/m);
156 print "\t$symbol";
157 };
158close(GLOBAL);
159
160# also add symbols from interp.sym
161# They are only needed if -DMULTIPLICITY is not set but it
162# doesn't hurt to include them anyway.
163# these don't have Perl prefix
164
165open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
166while (<INTERP>) {
167 my $symbol;
168 next if (!/^[A-Za-z]/);
169 next if (/_amg[ \t]*$/);
170 $symbol = $_;
171 next if ($skip_sym =~ m/$symbol/m);
172 #print "\t$symbol";
173 print "\tPerl_$symbol";
174 };
175
176#close(INTERP);
177
178while (<DATA>) {
179 my $symbol;
180 next if (!/^[A-Za-z]/);
181 next if (/^#/);
182 $symbol = $_;
183 next if ($skip_sym =~ m/^$symbol/m);
184 print "\t$symbol";
185 };
186
1871;
188__DATA__
189# extra globals not included above.
190perl_init_i18nl10n
191perl_init_ext
192perl_alloc
193perl_construct
194perl_destruct
195perl_free
196perl_parse
197perl_run
198perl_get_sv
199perl_get_av
200perl_get_hv
201perl_get_cv
202perl_call_argv
203perl_call_pv
204perl_call_method
205perl_call_sv
206perl_requirepv
207win32_inet_addr
208win32_gethostbyname
209win32_inet_ntoa
210win32_htons
211win32_ntohs
212win32_htonl