source: trunk/third/perl/win32/makedef.pl @ 10724

Revision 10724, 5.8 KB checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10723, which included commits to RCS files with non-trunk default branches.
Line 
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 exception list here
16
17my $CCTYPE = shift || "MSVC";
18
19$skip_sym=<<'!END!OF!SKIP!';
20Perl_SvIV
21Perl_SvNV
22Perl_SvTRUE
23Perl_SvUV
24Perl_block_type
25Perl_sv_pvn
26Perl_additem
27Perl_cast_ulong
28Perl_check_uni
29Perl_checkcomma
30Perl_chsize
31Perl_ck_aelem
32Perl_cryptseen
33Perl_cx_dump
34Perl_deb
35Perl_deb_growlevel
36Perl_debop
37Perl_debprofdump
38Perl_debstack
39Perl_debstackptrs
40Perl_do_ipcctl
41Perl_do_ipcget
42Perl_do_msgrcv
43Perl_do_msgsnd
44Perl_do_semop
45Perl_do_shmio
46Perl_doeval
47Perl_dofindlabel
48Perl_dopoptoeval
49Perl_dump_eval
50Perl_dump_fds
51Perl_dump_form
52Perl_dump_gv
53Perl_dump_mstats
54Perl_dump_op
55Perl_dump_packsubs
56Perl_dump_pm
57Perl_dump_sub
58Perl_expectterm
59Perl_fetch_gv
60Perl_fetch_io
61Perl_force_ident
62Perl_force_next
63Perl_force_word
64Perl_hv_stashpv
65Perl_intuit_more
66Perl_know_next
67Perl_modkids
68Perl_mstats
69Perl_my_bzero
70Perl_my_htonl
71Perl_my_ntohl
72Perl_my_swap
73Perl_my_chsize
74Perl_newXSUB
75Perl_no_fh_allowed
76Perl_no_op
77Perl_nointrp
78Perl_nomem
79Perl_pp_cswitch
80Perl_pp_entersubr
81Perl_pp_evalonce
82Perl_pp_interp
83Perl_pp_map
84Perl_pp_nswitch
85Perl_q
86Perl_reall_srchlen
87Perl_regdump
88Perl_regfold
89Perl_regmyendp
90Perl_regmyp_size
91Perl_regmystartp
92Perl_regnarrate
93Perl_regprop
94Perl_same_dirent
95Perl_saw_return
96Perl_scan_const
97Perl_scan_formline
98Perl_scan_heredoc
99Perl_scan_ident
100Perl_scan_inputsymbol
101Perl_scan_pat
102Perl_scan_prefix
103Perl_scan_str
104Perl_scan_subst
105Perl_scan_trans
106Perl_scan_word
107Perl_setenv_getix
108Perl_skipspace
109Perl_sublex_done
110Perl_sublex_start
111Perl_sv_peek
112Perl_sv_ref
113Perl_sv_setptrobj
114Perl_timesbuf
115Perl_too_few_arguments
116Perl_too_many_arguments
117Perl_unlnk
118Perl_wait4pid
119Perl_watch
120Perl_yyname
121Perl_yyrule
122allgvs
123curblock
124curcsv
125lastretstr
126mystack_mark
127perl_init_ext
128perl_requirepv
129stack
130statusvalue_vms
131Perl_safexcalloc
132Perl_safexmalloc
133Perl_safexfree
134Perl_safexrealloc
135Perl_my_memcmp
136Perl_my_memset
137Perl_cshlen
138Perl_cshname
139!END!OF!SKIP!
140
141# All symbols have a Perl_ prefix because that's what embed.h
142# sticks in front of them.
143
144
145print "LIBRARY Perl\n";
146print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
147print "CODE LOADONCALL\n";
148print "DATA LOADONCALL NONSHARED MULTIPLE\n";
149print "EXPORTS\n";
150
151open (GLOBAL, "<../global.sym") || die "failed to open global.sym" . $!;
152while (<GLOBAL>) {
153        my $symbol;
154        next if (!/^[A-Za-z]/);
155        next if (/_amg[ \t]*$/);
156        $symbol = "Perl_$_";
157        next if ($skip_sym =~ m/$symbol/m);
158        emit_symbol($symbol);
159}
160close(GLOBAL);
161
162# also add symbols from interp.sym
163# They are only needed if -DMULTIPLICITY is not set but it
164# doesn't hurt to include them anyway.
165# these don't have Perl prefix
166
167open (INTERP, "<../interp.sym") || die "failed to open interp.sym" . $!;
168while (<INTERP>) {
169        my $symbol;
170        next if (!/^[A-Za-z]/);
171        next if (/_amg[ \t]*$/);
172        $symbol = $_;
173        next if ($skip_sym =~ m/$symbol/m);
174        #print "\t$symbol";
175        emit_symbol("Perl_" . $symbol);
176}
177
178#close(INTERP);
179
180while (<DATA>) {
181        my $symbol;
182        next if (!/^[A-Za-z]/);
183        next if (/^#/);
184        $symbol = $_;
185        next if ($skip_sym =~ m/^$symbol/m);
186        emit_symbol($symbol);
187}
188
189sub emit_symbol {
190        my $symbol = shift;
191        chomp $symbol;
192        if ($CCTYPE eq "BORLAND") {
193                # workaround Borland quirk by exporting both the straight
194                # name and a name with leading underscore.  Note the
195                # alias *must* come after the symbol itself, if both
196                # are to be exported. (Linker bug?)
197                print "\t_$symbol\n";
198                print "\t$symbol = _$symbol\n";
199        }
200        else {
201                # for binary coexistence, export both the symbol and
202                # alias with leading underscore
203                print "\t$symbol\n";
204                print "\t_$symbol = $symbol\n";
205        }
206}
207
2081;
209__DATA__
210# extra globals not included above.
211perl_init_i18nl10n
212perl_init_ext
213perl_alloc
214perl_construct
215perl_destruct
216perl_free
217perl_parse
218perl_run
219perl_get_sv
220perl_get_av
221perl_get_hv
222perl_get_cv
223perl_call_argv
224perl_call_pv
225perl_call_method
226perl_call_sv
227perl_require_pv
228perl_eval_pv
229perl_eval_sv
230boot_DynaLoader
231win32_errno
232win32_environ
233win32_stdin
234win32_stdout
235win32_stderr
236win32_ferror
237win32_feof
238win32_strerror
239win32_fprintf
240win32_printf
241win32_vfprintf
242win32_vprintf
243win32_fread
244win32_fwrite
245win32_fopen
246win32_fdopen
247win32_freopen
248win32_fclose
249win32_fputs
250win32_fputc
251win32_ungetc
252win32_getc
253win32_fileno
254win32_clearerr
255win32_fflush
256win32_ftell
257win32_fseek
258win32_fgetpos
259win32_fsetpos
260win32_rewind
261win32_tmpfile
262win32_abort
263win32_fstat
264win32_stat
265win32_pipe
266win32_popen
267win32_pclose
268win32_setmode
269win32_lseek
270win32_tell
271win32_dup
272win32_dup2
273win32_open
274win32_close
275win32_eof
276win32_read
277win32_write
278win32_spawnvp
279win32_mkdir
280win32_rmdir
281win32_chdir
282win32_flock
283win32_execvp
284win32_htons
285win32_ntohs
286win32_htonl
287win32_ntohl
288win32_inet_addr
289win32_inet_ntoa
290win32_socket
291win32_bind
292win32_listen
293win32_accept
294win32_connect
295win32_send
296win32_sendto
297win32_recv
298win32_recvfrom
299win32_shutdown
300win32_ioctlsocket
301win32_setsockopt
302win32_getsockopt
303win32_getpeername
304win32_getsockname
305win32_gethostname
306win32_gethostbyname
307win32_gethostbyaddr
308win32_getprotobyname
309win32_getprotobynumber
310win32_getservbyname
311win32_getservbyport
312win32_select
313win32_endhostent
314win32_endnetent
315win32_endprotoent
316win32_endservent
317win32_getnetent
318win32_getnetbyname
319win32_getnetbyaddr
320win32_getprotoent
321win32_getservent
322win32_sethostent
323win32_setnetent
324win32_setprotoent
325win32_setservent
326win32_getenv
327win32_perror
328win32_setbuf
329win32_setvbuf
330win32_flushall
331win32_fcloseall
332win32_fgets
333win32_gets
334win32_fgetc
335win32_putc
336win32_puts
337win32_getchar
338win32_putchar
339win32_malloc
340win32_calloc
341win32_realloc
342win32_free
343win32stdio
344Perl_win32_init
345RunPerl
346SetIOSubSystem
347GetIOSubSystem
Note: See TracBrowser for help on using the repository browser.