This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
[perl5.git] / makedef.pl
CommitLineData
549a6b10
JH
1#
2# Create the export list for perl.
3#
86593e8d
JH
4# Needed by WIN32 and OS/2 for creating perl.dll,
5# and by AIX for creating libperl.a when -Dusershrplib is in effect,
6# and by MacOS Classic.
549a6b10 7#
22c35a8c 8# reads global.sym, pp.sym, perlvars.h, intrpvar.h, thrdvar.h, config.h
8257dec7 9# On OS/2 reads miniperl.map and the previous version of perl5.def as well
0a753a76 10
549a6b10
JH
11my $PLATFORM;
12my $CCTYPE;
910dfcc8 13
7766f137
GS
14while (@ARGV) {
15 my $flag = shift;
8257dec7
IZ
16 if ($flag =~ s/^CC_FLAGS=/ /) {
17 for my $fflag ($flag =~ /(?:^|\s)-D(\S+)/g) {
18 $fflag .= '=1' unless $fflag =~ /^(\w+)=/;
19 $define{$1} = $2 if $fflag =~ /^(\w+)=(.+)$/;
20 }
21 next;
22 }
7766f137
GS
23 $define{$1} = 1 if ($flag =~ /^-D(\w+)$/);
24 $define{$1} = $2 if ($flag =~ /^-D(\w+)=(.+)$/);
25 $CCTYPE = $1 if ($flag =~ /^CCTYPE=(\w+)$/);
26 $PLATFORM = $1 if ($flag =~ /^PLATFORM=(\w+)$/);
18f68570
VK
27 if ($PLATFORM eq 'netware') {
28 $FILETYPE = $1 if ($flag =~ /^FILETYPE=(\w+)$/);
29 }
7766f137 30}
d55594ae 31
18f68570 32my @PLATFORM = qw(aix win32 wince os2 MacOS netware);
549a6b10
JH
33my %PLATFORM;
34@PLATFORM{@PLATFORM} = ();
35
36defined $PLATFORM || die "PLATFORM undefined, must be one of: @PLATFORM\n";
9df9a5cd 37exists $PLATFORM{$PLATFORM} || die "PLATFORM must be one of: @PLATFORM\n";
549a6b10 38
c6261f3b
JH
39my %exportperlmalloc =
40 (
41 Perl_malloc => "malloc",
42 Perl_mfree => "free",
43 Perl_realloc => "realloc",
44 Perl_calloc => "calloc",
45 );
46
47my $exportperlmalloc = $PLATFORM eq 'os2';
48
549a6b10
JH
49my $config_sh = "config.sh";
50my $config_h = "config.h";
51my $thrdvar_h = "thrdvar.h";
52my $intrpvar_h = "intrpvar.h";
53my $perlvars_h = "perlvars.h";
54my $global_sym = "global.sym";
55my $pp_sym = "pp.sym";
56my $globvar_sym = "globvar.sym";
57my $perlio_sym = "perlio.sym";
58
9df9a5cd 59if ($PLATFORM eq 'aix') {
549a6b10 60 # Nothing for now.
7766f137 61}
18f68570 62elsif ($PLATFORM =~ /^win(?:32|ce)$/ || $PLATFORM eq 'netware') {
549a6b10 63 $CCTYPE = "MSVC" unless defined $CCTYPE;
00b02797
JH
64 foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
65 $pp_sym, $globvar_sym, $perlio_sym) {
549a6b10
JH
66 s!^!..\\!;
67 }
68}
084592ab
CN
69elsif ($PLATFORM eq 'MacOS') {
70 foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
71 $pp_sym, $globvar_sym, $perlio_sym) {
72 s!^!::!;
73 }
74}
549a6b10 75
18f68570 76unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'MacOS' || $PLATFORM eq 'netware') {
549a6b10 77 open(CFG,$config_sh) || die "Cannot open $config_sh: $!\n";
7766f137 78 while (<CFG>) {
549a6b10
JH
79 if (/^(?:ccflags|optimize)='(.+)'$/) {
80 $_ = $1;
81 $define{$1} = 1 while /-D(\w+)/g;
82 }
3cfae81b 83 if ($PLATFORM eq 'os2') {
52e4c282
IZ
84 $CONFIG_ARGS = $1 if /^config_args='(.+)'$/;
85 $ARCHNAME = $1 if /^archname='(.+)'$/;
86 $PATCHLEVEL = $1 if /^perl_patchlevel='(.+)'$/;
3cfae81b 87 }
549a6b10
JH
88 }
89 close(CFG);
90}
91
92open(CFG,$config_h) || die "Cannot open $config_h: $!\n";
7766f137
GS
93while (<CFG>) {
94 $define{$1} = 1 if /^\s*#\s*define\s+(MYMALLOC)\b/;
7766f137 95 $define{$1} = 1 if /^\s*#\s*define\s+(MULTIPLICITY)\b/;
0e32cd81
JH
96 $define{$1} = 1 if /^\s*#\s*define\s+(PERL_\w+)\b/;
97 $define{$1} = 1 if /^\s*#\s*define\s+(USE_\w+)\b/;
7766f137 98}
bbc8f9de
NIS
99close(CFG);
100
18c4b137
JH
101# perl.h logic duplication begins
102
ac6bedea
JH
103if ($define{PERL_IMPLICIT_SYS}) {
104 $define{PL_OP_SLAB_ALLOC} = 1;
105}
106
18c4b137 107if ($define{USE_ITHREADS}) {
acfe0abc 108 if (!$define{MULTIPLICITY}) {
18c4b137
JH
109 $define{MULTIPLICITY} = 1;
110 }
111}
112
113$define{PERL_IMPLICIT_CONTEXT} ||=
114 $define{USE_ITHREADS} ||
66cf6f75 115 $define{USE_5005THREADS} ||
18c4b137
JH
116 $define{MULTIPLICITY} ;
117
10bc17b6
JH
118if ($define{USE_ITHREADS} && $PLATFORM ne 'win32' && $^O ne 'darwin') {
119 $define{USE_REENTRANT_API} = 1;
120}
121
18c4b137
JH
122# perl.h logic duplication ends
123
ac6bedea
JH
124my $sym_ord = 0;
125
18f68570 126if ($PLATFORM =~ /^win(?:32|ce)$/) {
549a6b10 127 warn join(' ',keys %define)."\n";
18f68570
VK
128 ($dll = ($define{PERL_DLL} || "perl58")) =~ s/\.dll$//i;
129 print "LIBRARY $dll\n";
dfdd1393
GS
130 print "DESCRIPTION 'Perl interpreter'\n";
131 print "EXPORTS\n";
132 if ($define{PERL_IMPLICIT_SYS}) {
549a6b10 133 output_symbol("perl_get_host_info");
7766f137 134 output_symbol("perl_alloc_override");
0295eab8 135 }
b54a2e1e 136 if ($define{USE_ITHREADS} and $define{PERL_IMPLICIT_SYS}) {
ac6bedea 137 output_symbol("perl_clone_host");
51371543 138 }
7766f137
GS
139}
140elsif ($PLATFORM eq 'os2') {
52e4c282
IZ
141 if (open my $fh, '<', 'perl5.def') {
142 while (<$fh>) {
143 last if /^\s*EXPORTS\b/;
144 }
145 while (<$fh>) {
78232bc0 146 $ordinal{$1} = $2 if /^\s*"(\w+)"\s*(?:=\s*"\w+"\s*)?\@(\d+)\s*$/;
52e4c282
IZ
147 # This allows skipping ordinals which were used in older versions
148 $sym_ord = $1 if /^\s*;\s*LAST_ORDINAL\s*=\s*(\d+)\s*$/;
149 }
150 $sym_ord < $_ and $sym_ord = $_ for values %ordinal; # Take the max
151 }
3cfae81b
IZ
152 ($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/;
153 $v .= '-thread' if $ARCHNAME =~ /-thread/;
3cfae81b 154 ($dll = $define{PERL_DLL}) =~ s/\.dll$//i;
52e4c282 155 $v .= "\@$PATCHLEVEL" if $PATCHLEVEL;
1102eebe
IZ
156 $d = "DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'";
157 $d = substr($d, 0, 249) . "...'" if length $d > 253;
3cfae81b
IZ
158 print <<"---EOP---";
159LIBRARY '$dll' INITINSTANCE TERMINSTANCE
1102eebe 160$d
3cfae81b
IZ
161STACKSIZE 32768
162CODE LOADONCALL
163DATA LOADONCALL NONSHARED MULTIPLE
164EXPORTS
165---EOP---
7766f137
GS
166}
167elsif ($PLATFORM eq 'aix') {
61d42ce4
JH
168 $OSVER = `uname -v`;
169 chop $OSVER;
170 $OSREL = `uname -r`;
171 chop $OSREL;
172 if ($OSVER > 4 || ($OSVER == 4 && $OSREL >= 3)) {
173 print "#! ..\n";
174 } else {
175 print "#!\n";
176 }
ac4c12e7 177}
2986a63f
JH
178elsif ($PLATFORM eq 'netware') {
179 if ($FILETYPE eq 'def') {
9c25e1f8 180 print "LIBRARY perl58\n";
2986a63f
JH
181 print "DESCRIPTION 'Perl interpreter for NetWare'\n";
182 print "EXPORTS\n";
183 }
184 if ($define{PERL_IMPLICIT_SYS}) {
ac6bedea
JH
185 output_symbol("perl_get_host_info");
186 output_symbol("perl_alloc_override");
187 output_symbol("perl_clone_host");
2986a63f
JH
188 }
189}
bbc8f9de 190
22239a37
NIS
191my %skip;
192my %export;
193
51371543
GS
194sub skip_symbols {
195 my $list = shift;
196 foreach my $symbol (@$list) {
197 $skip{$symbol} = 1;
198 }
22239a37
NIS
199}
200
51371543
GS
201sub emit_symbols {
202 my $list = shift;
203 foreach my $symbol (@$list) {
204 my $skipsym = $symbol;
205 # XXX hack
acfe0abc 206 if ($define{MULTIPLICITY}) {
51371543
GS
207 $skipsym =~ s/^Perl_[GIT](\w+)_ptr$/PL_$1/;
208 }
209 emit_symbol($symbol) unless exists $skip{$skipsym};
210 }
22239a37
NIS
211}
212
549a6b10 213if ($PLATFORM eq 'win32') {
7766f137
GS
214 skip_symbols [qw(
215 PL_statusvalue_vms
216 PL_archpat_auto
217 PL_cryptseen
218 PL_DBcv
219 PL_generation
220 PL_lastgotoprobe
221 PL_linestart
222 PL_modcount
223 PL_pending_ident
224 PL_sortcxix
225 PL_sublex_info
226 PL_timesbuf
227 main
228 Perl_ErrorNo
229 Perl_GetVars
230 Perl_do_exec3
231 Perl_do_ipcctl
232 Perl_do_ipcget
233 Perl_do_msgrcv
234 Perl_do_msgsnd
235 Perl_do_semop
236 Perl_do_shmio
237 Perl_dump_fds
238 Perl_init_thread_intern
239 Perl_my_bzero
9d50d399 240 Perl_my_bcopy
7766f137
GS
241 Perl_my_htonl
242 Perl_my_ntohl
243 Perl_my_swap
244 Perl_my_chsize
245 Perl_same_dirent
246 Perl_setenv_getix
247 Perl_unlnk
248 Perl_watch
249 Perl_safexcalloc
250 Perl_safexmalloc
251 Perl_safexfree
252 Perl_safexrealloc
253 Perl_my_memcmp
254 Perl_my_memset
255 PL_cshlen
256 PL_cshname
257 PL_opsave
258 Perl_do_exec
259 Perl_getenv_len
260 Perl_my_pclose
261 Perl_my_popen
262 )];
263}
54725af6
GS
264else {
265 skip_symbols [qw(
266 Perl_do_spawn
267 Perl_do_spawn_nowait
268 Perl_do_aspawn
269 )];
270}
271if ($PLATFORM eq 'wince') {
18f68570
VK
272 skip_symbols [qw(
273 PL_statusvalue_vms
274 PL_archpat_auto
275 PL_cryptseen
276 PL_DBcv
277 PL_generation
278 PL_lastgotoprobe
279 PL_linestart
280 PL_modcount
281 PL_pending_ident
282 PL_sortcxix
283 PL_sublex_info
284 PL_timesbuf
285 PL_collation_ix
286 PL_collation_name
287 PL_collation_standard
288 PL_collxfrm_base
289 PL_collxfrm_mult
290 PL_numeric_compat1
291 PL_numeric_local
292 PL_numeric_name
293 PL_numeric_radix_sv
294 PL_numeric_standard
295 PL_vtbl_collxfrm
296 Perl_sv_collxfrm
297 setgid
298 setuid
299 win32_async_check
300 win32_free_childdir
301 win32_free_childenv
302 win32_get_childdir
303 win32_get_childenv
304 win32_spawnvp
305 main
306 Perl_ErrorNo
307 Perl_GetVars
308 Perl_do_exec3
309 Perl_do_ipcctl
310 Perl_do_ipcget
311 Perl_do_msgrcv
312 Perl_do_msgsnd
313 Perl_do_semop
314 Perl_do_shmio
315 Perl_dump_fds
316 Perl_init_thread_intern
317 Perl_my_bzero
318 Perl_my_bcopy
319 Perl_my_htonl
320 Perl_my_ntohl
321 Perl_my_swap
322 Perl_my_chsize
323 Perl_same_dirent
324 Perl_setenv_getix
325 Perl_unlnk
326 Perl_watch
327 Perl_safexcalloc
328 Perl_safexmalloc
329 Perl_safexfree
330 Perl_safexrealloc
331 Perl_my_memcmp
332 Perl_my_memset
333 PL_cshlen
334 PL_cshname
335 PL_opsave
336 Perl_do_exec
337 Perl_getenv_len
338 Perl_my_pclose
339 Perl_my_popen
340 )];
341}
7766f137 342elsif ($PLATFORM eq 'aix') {
549a6b10 343 skip_symbols([qw(
7766f137
GS
344 Perl_dump_fds
345 Perl_ErrorNo
346 Perl_GetVars
347 Perl_my_bcopy
348 Perl_my_bzero
349 Perl_my_chsize
350 Perl_my_htonl
351 Perl_my_memcmp
352 Perl_my_memset
353 Perl_my_ntohl
354 Perl_my_swap
355 Perl_safexcalloc
356 Perl_safexfree
357 Perl_safexmalloc
358 Perl_safexrealloc
359 Perl_same_dirent
360 Perl_unlnk
6c644e78 361 Perl_sys_intern_clear
95151ede 362 Perl_sys_intern_dup
52853b95 363 Perl_sys_intern_init
7766f137
GS
364 PL_cryptseen
365 PL_opsave
366 PL_statusvalue_vms
367 PL_sys_intern
368 )]);
369}
370elsif ($PLATFORM eq 'os2') {
3cfae81b 371 emit_symbols([qw(
7766f137
GS
372 ctermid
373 get_sysinfo
374 Perl_OS2_init
764df951
IZ
375 Perl_OS2_init3
376 Perl_OS2_term
7766f137
GS
377 OS2_Perl_data
378 dlopen
379 dlsym
380 dlerror
403d6f8e 381 dlclose
7766f137
GS
382 my_tmpfile
383 my_tmpnam
384 my_flock
9c130f5b
NIS
385 my_rmdir
386 my_mkdir
f72c975a
IZ
387 my_getpwuid
388 my_getpwnam
389 my_getpwent
390 my_setpwent
391 my_endpwent
18729d3e
JH
392 fork_with_resources
393 croak_with_os2error
f72c975a
IZ
394 setgrent
395 endgrent
396 getgrent
7766f137
GS
397 malloc_mutex
398 threads_mutex
399 nthreads
400 nthreads_cond
401 os2_cond_wait
402 os2_stat
403 pthread_join
404 pthread_create
405 pthread_detach
406 XS_Cwd_change_drive
407 XS_Cwd_current_drive
408 XS_Cwd_extLibpath
409 XS_Cwd_extLibpath_set
410 XS_Cwd_sys_abspath
411 XS_Cwd_sys_chdir
412 XS_Cwd_sys_cwd
413 XS_Cwd_sys_is_absolute
414 XS_Cwd_sys_is_relative
415 XS_Cwd_sys_is_rooted
416 XS_DynaLoader_mod2fname
417 XS_File__Copy_syscopy
418 Perl_Register_MQ
419 Perl_Deregister_MQ
420 Perl_Serve_Messages
421 Perl_Process_Messages
422 init_PMWIN_entries
423 PMWIN_entries
424 Perl_hab_GET
35bc1fdc
IZ
425 loadByOrdinal
426 pExtFCN
30500b05
IZ
427 os2error
428 ResetWinError
429 CroakWinError
8257dec7 430 PL_do_undump
7766f137 431 )]);
8257dec7
IZ
432 emit_symbols([qw(os2_cond_wait
433 pthread_join
434 pthread_create
435 pthread_detach
436 )])
437 if $define{'USE_5005THREADS'} or $define{'USE_ITHREADS'};
3cfae81b 438}
084592ab
CN
439elsif ($PLATFORM eq 'MacOS') {
440 skip_symbols [qw(
441 Perl_GetVars
442 PL_cryptseen
443 PL_cshlen
444 PL_cshname
445 PL_statusvalue_vms
446 PL_sys_intern
447 PL_opsave
448 PL_timesbuf
449 Perl_dump_fds
450 Perl_my_bcopy
451 Perl_my_bzero
452 Perl_my_chsize
453 Perl_my_htonl
454 Perl_my_memcmp
455 Perl_my_memset
456 Perl_my_ntohl
457 Perl_my_swap
458 Perl_safexcalloc
459 Perl_safexfree
460 Perl_safexmalloc
461 Perl_safexrealloc
462 Perl_unlnk
fe05f414
JH
463 Perl_sys_intern_clear
464 Perl_sys_intern_init
084592ab
CN
465 )];
466}
2986a63f
JH
467elsif ($PLATFORM eq 'netware') {
468 skip_symbols [qw(
469 PL_statusvalue_vms
470 PL_archpat_auto
471 PL_cryptseen
472 PL_DBcv
473 PL_generation
474 PL_lastgotoprobe
475 PL_linestart
476 PL_modcount
477 PL_pending_ident
478 PL_sortcxix
479 PL_sublex_info
480 PL_timesbuf
481 main
482 Perl_ErrorNo
483 Perl_GetVars
484 Perl_do_exec3
485 Perl_do_ipcctl
486 Perl_do_ipcget
487 Perl_do_msgrcv
488 Perl_do_msgsnd
489 Perl_do_semop
490 Perl_do_shmio
491 Perl_dump_fds
492 Perl_init_thread_intern
493 Perl_my_bzero
494 Perl_my_htonl
495 Perl_my_ntohl
496 Perl_my_swap
497 Perl_my_chsize
498 Perl_same_dirent
499 Perl_setenv_getix
500 Perl_unlnk
501 Perl_watch
502 Perl_safexcalloc
503 Perl_safexmalloc
504 Perl_safexfree
505 Perl_safexrealloc
506 Perl_my_memcmp
507 Perl_my_memset
508 PL_cshlen
509 PL_cshname
510 PL_opsave
511 Perl_do_exec
512 Perl_getenv_len
513 Perl_my_pclose
514 Perl_my_popen
011f1a1a
JH
515 Perl_sys_intern_init
516 Perl_sys_intern_dup
517 Perl_sys_intern_clear
518 Perl_my_bcopy
519 Perl_PerlIO_write
520 Perl_PerlIO_unread
521 Perl_PerlIO_tell
522 Perl_PerlIO_stdout
523 Perl_PerlIO_stdin
524 Perl_PerlIO_stderr
525 Perl_PerlIO_setlinebuf
526 Perl_PerlIO_set_ptrcnt
527 Perl_PerlIO_set_cnt
528 Perl_PerlIO_seek
529 Perl_PerlIO_read
530 Perl_PerlIO_get_ptr
531 Perl_PerlIO_get_cnt
532 Perl_PerlIO_get_bufsiz
533 Perl_PerlIO_get_base
534 Perl_PerlIO_flush
535 Perl_PerlIO_fill
536 Perl_PerlIO_fileno
537 Perl_PerlIO_error
538 Perl_PerlIO_eof
539 Perl_PerlIO_close
540 Perl_PerlIO_clearerr
541 PerlIO_perlio
2986a63f
JH
542 )];
543}
3cfae81b 544
7766f137
GS
545unless ($define{'DEBUGGING'}) {
546 skip_symbols [qw(
7766f137
GS
547 Perl_deb_growlevel
548 Perl_debop
549 Perl_debprofdump
550 Perl_debstack
551 Perl_debstackptrs
7766f137
GS
552 Perl_sv_peek
553 PL_block_type
554 PL_watchaddr
555 PL_watchok
556 )];
557}
558
559if ($define{'PERL_IMPLICIT_SYS'}) {
560 skip_symbols [qw(
561 Perl_getenv_len
562 Perl_my_popen
563 Perl_my_pclose
564 )];
565}
566else {
567 skip_symbols [qw(
568 PL_Mem
569 PL_MemShared
570 PL_MemParse
571 PL_Env
572 PL_StdIO
573 PL_LIO
574 PL_Dir
575 PL_Sock
576 PL_Proc
577 )];
578}
579
7c128300
GS
580unless ($define{'PERL_FLEXIBLE_EXCEPTIONS'}) {
581 skip_symbols [qw(
582 PL_protect
583 Perl_default_protect
584 Perl_vdefault_protect
585 )];
586}
587
5bcb3f6c
NIS
588unless ($define{'USE_REENTRANT_API'}) {
589 skip_symbols [qw(
590 PL_reentrant_buffer
591 )];
592}
593
7766f137
GS
594if ($define{'MYMALLOC'}) {
595 emit_symbols [qw(
596 Perl_dump_mstats
827e134a 597 Perl_get_mstats
9c130f5b
NIS
598 Perl_strdup
599 Perl_putenv
7766f137 600 )];
bbda9c9d 601 if ($define{'USE_5005THREADS'} || $define{'USE_ITHREADS'}) {
1feb2720
GS
602 emit_symbols [qw(
603 PL_malloc_mutex
604 )];
605 }
80fc1a6e
GS
606 else {
607 skip_symbols [qw(
608 PL_malloc_mutex
609 )];
610 }
51371543
GS
611}
612else {
7766f137
GS
613 skip_symbols [qw(
614 PL_malloc_mutex
615 Perl_dump_mstats
6ecd3fcb 616 Perl_get_mstats
7766f137
GS
617 Perl_malloced_size
618 )];
619}
620
f433d095 621unless ($define{'USE_5005THREADS'} || $define{'USE_ITHREADS'}) {
7766f137
GS
622 skip_symbols [qw(
623 PL_thr_key
f433d095
GS
624 )];
625}
626
627unless ($define{'USE_5005THREADS'}) {
628 skip_symbols [qw(
7766f137
GS
629 PL_sv_mutex
630 PL_strtab_mutex
631 PL_svref_mutex
7766f137
GS
632 PL_cred_mutex
633 PL_eval_mutex
6940069f
GS
634 PL_fdpid_mutex
635 PL_sv_lock_mutex
7766f137
GS
636 PL_eval_cond
637 PL_eval_owner
638 PL_threads_mutex
639 PL_nthreads
640 PL_nthreads_cond
641 PL_threadnum
642 PL_threadsv_names
643 PL_thrsv
644 PL_vtbl_mutex
7766f137
GS
645 Perl_condpair_magic
646 Perl_new_struct_thread
647 Perl_per_thread_magicals
648 Perl_thread_create
649 Perl_find_threadsv
650 Perl_unlock_condpair
651 Perl_magic_mutexfree
4755096e 652 Perl_sv_lock
7766f137
GS
653 )];
654}
655
656unless ($define{'USE_ITHREADS'}) {
657 skip_symbols [qw(
658 PL_ptr_table
534825c4 659 PL_op_mutex
7e95b20d
JH
660 PL_regex_pad
661 PL_regex_padav
f2f7cecd
MB
662 PL_sharedsv_space
663 PL_sharedsv_space_mutex
7223e9d8 664 PL_dollarzero_mutex
7766f137
GS
665 Perl_dirp_dup
666 Perl_cx_dup
667 Perl_si_dup
668 Perl_any_dup
669 Perl_ss_dup
670 Perl_fp_dup
671 Perl_gp_dup
672 Perl_he_dup
673 Perl_mg_dup
674 Perl_re_dup
675 Perl_sv_dup
676 Perl_sys_intern_dup
86593e8d 677 Perl_ptr_table_clear
7766f137 678 Perl_ptr_table_fetch
86593e8d 679 Perl_ptr_table_free
7766f137 680 Perl_ptr_table_new
4ac9195f
MS
681 Perl_ptr_table_clear
682 Perl_ptr_table_free
7766f137
GS
683 Perl_ptr_table_split
684 Perl_ptr_table_store
685 perl_clone
686 perl_clone_using
038f0558
JH
687 Perl_sharedsv_find
688 Perl_sharedsv_init
689 Perl_sharedsv_lock
690 Perl_sharedsv_new
691 Perl_sharedsv_thrcnt_dec
692 Perl_sharedsv_thrcnt_inc
693 Perl_sharedsv_unlock
7766f137
GS
694 )];
695}
696
697unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
698 skip_symbols [qw(
699 Perl_croak_nocontext
700 Perl_die_nocontext
701 Perl_deb_nocontext
702 Perl_form_nocontext
e0f4245d 703 Perl_load_module_nocontext
7766f137
GS
704 Perl_mess_nocontext
705 Perl_warn_nocontext
706 Perl_warner_nocontext
707 Perl_newSVpvf_nocontext
708 Perl_sv_catpvf_nocontext
709 Perl_sv_setpvf_nocontext
710 Perl_sv_catpvf_mg_nocontext
711 Perl_sv_setpvf_mg_nocontext
712 )];
713}
714
715unless ($define{'PERL_IMPLICIT_SYS'}) {
716 skip_symbols [qw(
717 perl_alloc_using
014822e4 718 perl_clone_using
7766f137
GS
719 )];
720}
721
722unless ($define{'FAKE_THREADS'}) {
723 skip_symbols [qw(PL_curthr)];
724}
725
ac6bedea
JH
726unless ($define{'PL_OP_SLAB_ALLOC'}) {
727 skip_symbols [qw(
728 PL_OpPtr
729 PL_OpSlab
730 PL_OpSpace
731 )];
732}
733
5b7ea690
JH
734unless ($define{'THREADS_HAVE_PIDS'}) {
735 skip_symbols [qw(PL_ppid)];
736}
737
7766f137
GS
738sub readvar {
739 my $file = shift;
740 my $proc = shift || sub { "PL_$_[2]" };
741 open(VARS,$file) || die "Cannot open $file: $!\n";
742 my @syms;
743 while (<VARS>) {
744 # All symbols have a Perl_ prefix because that's what embed.h
745 # sticks in front of them.
746 push(@syms, &$proc($1,$2,$3)) if (/\bPERLVAR(A?I?C?)\(([IGT])(\w+)/);
9df9a5cd
NIS
747 }
748 close(VARS);
7766f137
GS
749 return \@syms;
750}
751
6f4183fe 752if ($define{'USE_5005THREADS'}) {
7766f137
GS
753 my $thrd = readvar($thrdvar_h);
754 skip_symbols $thrd;
755}
756
7766f137
GS
757if ($define{'PERL_GLOBAL_STRUCT'}) {
758 my $global = readvar($perlvars_h);
759 skip_symbols $global;
760 emit_symbol('Perl_GetVars');
761 emit_symbols [qw(PL_Vars PL_VarsPtr)] unless $CCTYPE eq 'GCC';
762}
36c15d3f 763
22c35a8c
GS
764# functions from *.sym files
765
954c1994 766my @syms = ($global_sym, $globvar_sym); # $pp_sym is not part of the API
549a6b10 767
d892637e
NIS
768# Symbols that are the public face of the PerlIO layers implementation
769# These are in _addition to_ the public face of the abstraction
770# and need to be exported to allow XS modules to implement layers
9df9a5cd
NIS
771my @layer_syms = qw(
772 PerlIOBase_clearerr
773 PerlIOBase_close
8437356b 774 PerlIOBase_dup
9df9a5cd
NIS
775 PerlIOBase_eof
776 PerlIOBase_error
777 PerlIOBase_fileno
8c0134a8 778 PerlIOBase_pushed
86e05cf2 779 PerlIOBase_binmode
44798d05 780 PerlIOBase_popped
8c0134a8 781 PerlIOBase_read
55ac2d47 782 PerlIOBase_setlinebuf
d892637e 783 PerlIOBase_unread
0710cc63
JH
784 PerlIOBase_noop_ok
785 PerlIOBase_noop_fail
9df9a5cd 786 PerlIOBuf_bufsiz
9df9a5cd
NIS
787 PerlIOBuf_fill
788 PerlIOBuf_flush
91939a65 789 PerlIOBuf_get_base
9df9a5cd
NIS
790 PerlIOBuf_get_cnt
791 PerlIOBuf_get_ptr
792 PerlIOBuf_open
793 PerlIOBuf_pushed
44798d05 794 PerlIOBuf_popped
9df9a5cd 795 PerlIOBuf_read
9df9a5cd
NIS
796 PerlIOBuf_seek
797 PerlIOBuf_set_ptrcnt
9df9a5cd
NIS
798 PerlIOBuf_tell
799 PerlIOBuf_unread
800 PerlIOBuf_write
d892637e 801 PerlIO_debug
55ac2d47 802 PerlIO_allocate
d892637e
NIS
803 PerlIO_apply_layera
804 PerlIO_apply_layers
8c0134a8 805 PerlIO_arg_fetch
55ac2d47 806 PerlIO_define_layer
d9dac8cd
NIS
807 PerlIO_modestr
808 PerlIO_parse_layers
809 PerlIO_layer_fetch
810 PerlIO_list_free
811 PerlIO_apply_layera
9df9a5cd
NIS
812 PerlIO_pending
813 PerlIO_push
abfa7759 814 PerlIO_pop
8437356b 815 PerlIO_sv_dup
ad6971c8 816 PerlIO_perlio
1e8a8f59
NIS
817
818Perl_PerlIO_clearerr
819Perl_PerlIO_close
820Perl_PerlIO_eof
821Perl_PerlIO_error
822Perl_PerlIO_fileno
823Perl_PerlIO_fill
824Perl_PerlIO_flush
825Perl_PerlIO_get_base
826Perl_PerlIO_get_bufsiz
827Perl_PerlIO_get_cnt
828Perl_PerlIO_get_ptr
829Perl_PerlIO_read
830Perl_PerlIO_seek
831Perl_PerlIO_set_cnt
832Perl_PerlIO_set_ptrcnt
833Perl_PerlIO_setlinebuf
834Perl_PerlIO_stderr
835Perl_PerlIO_stdin
836Perl_PerlIO_stdout
837Perl_PerlIO_tell
838Perl_PerlIO_unread
839Perl_PerlIO_write
840
9df9a5cd 841);
a5564b91
JH
842if ($PLATFORM eq 'netware') {
843 push(@layer_syms,'PL_def_layerlist','PL_known_layers','PL_perlio');
844}
d892637e 845
7766f137 846if ($define{'USE_PERLIO'}) {
d892637e
NIS
847 # Export the symols that make up the PerlIO abstraction, regardless
848 # of its implementation - read from a file
084592ab 849 push @syms, $perlio_sym;
d892637e
NIS
850
851 # This part is then dependent on how the abstraction is implemented
084592ab 852 if ($define{'USE_SFIO'}) {
d892637e 853 # Old legacy non-stdio "PerlIO"
9df9a5cd 854 skip_symbols \@layer_syms;
084592ab 855 # SFIO defines most of the PerlIO routines as macros
d892637e
NIS
856 # So undo most of what $perlio_sym has just done - d'oh !
857 # Perhaps it would be better to list the ones which do exist
858 # And emit them
084592ab
CN
859 skip_symbols [qw(
860 PerlIO_canset_cnt
861 PerlIO_clearerr
862 PerlIO_close
863 PerlIO_eof
864 PerlIO_error
865 PerlIO_exportFILE
866 PerlIO_fast_gets
867 PerlIO_fdopen
868 PerlIO_fileno
869 PerlIO_findFILE
870 PerlIO_flush
871 PerlIO_get_base
872 PerlIO_get_bufsiz
873 PerlIO_get_cnt
874 PerlIO_get_ptr
875 PerlIO_getc
876 PerlIO_getname
877 PerlIO_has_base
878 PerlIO_has_cntptr
879 PerlIO_importFILE
880 PerlIO_open
881 PerlIO_printf
882 PerlIO_putc
883 PerlIO_puts
884 PerlIO_read
885 PerlIO_releaseFILE
886 PerlIO_reopen
887 PerlIO_rewind
888 PerlIO_seek
889 PerlIO_set_cnt
890 PerlIO_set_ptrcnt
891 PerlIO_setlinebuf
892 PerlIO_sprintf
893 PerlIO_stderr
894 PerlIO_stdin
895 PerlIO_stdout
896 PerlIO_stdoutf
897 PerlIO_tell
898 PerlIO_ungetc
899 PerlIO_vprintf
900 PerlIO_write
bcdb689b
JH
901 PerlIO_perlio
902 Perl_PerlIO_clearerr
903 Perl_PerlIO_close
904 Perl_PerlIO_eof
905 Perl_PerlIO_error
906 Perl_PerlIO_fileno
907 Perl_PerlIO_fill
908 Perl_PerlIO_flush
909 Perl_PerlIO_get_base
910 Perl_PerlIO_get_bufsiz
911 Perl_PerlIO_get_cnt
912 Perl_PerlIO_get_ptr
913 Perl_PerlIO_read
914 Perl_PerlIO_seek
915 Perl_PerlIO_set_cnt
916 Perl_PerlIO_set_ptrcnt
917 Perl_PerlIO_setlinebuf
918 Perl_PerlIO_stderr
919 Perl_PerlIO_stdin
920 Perl_PerlIO_stdout
921 Perl_PerlIO_tell
922 Perl_PerlIO_unread
923 Perl_PerlIO_write
ffcf5686
JH
924 PL_def_layerlist
925 PL_known_layers
926 PL_perlio
084592ab
CN
927 )];
928 }
d892637e
NIS
929 else {
930 # PerlIO with layers - export implementation
931 emit_symbols \@layer_syms;
932 }
5138f914 933} else {
d892637e
NIS
934 # -Uuseperlio
935 # Skip the PerlIO layer symbols - although
936 # nothing should have exported them any way
9df9a5cd 937 skip_symbols \@layer_syms;
1e8a8f59
NIS
938 skip_symbols [qw(PL_def_layerlist PL_known_layers PL_perlio)];
939
d892637e
NIS
940 # Also do NOT add abstraction symbols from $perlio_sym
941 # abstraction is done as #define to stdio
942 # Remaining remnants that _may_ be functions
943 # are handled in <DATA>
9df9a5cd 944}
7766f137
GS
945
946for my $syms (@syms) {
947 open (GLOBAL, "<$syms") || die "failed to open $syms: $!\n";
948 while (<GLOBAL>) {
949 next if (!/^[A-Za-z]/);
950 # Functions have a Perl_ prefix
951 # Variables have a PL_ prefix
952 chomp($_);
953 my $symbol = ($syms =~ /var\.sym$/i ? "PL_" : "");
954 $symbol .= $_;
955 emit_symbol($symbol) unless exists $skip{$symbol};
956 }
957 close(GLOBAL);
958}
0a753a76 959
22c35a8c 960# variables
0a753a76 961
acfe0abc 962if ($define{'MULTIPLICITY'}) {
1acb48c9 963 for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
18c4b137
JH
964 my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
965 emit_symbols $glob;
18c4b137 966 }
1acb48c9 967 # XXX AIX seems to want the perlvars.h symbols, for some reason
8257dec7 968 if ($PLATFORM eq 'aix' or $PLATFORM eq 'os2') { # OS/2 needs PL_thr_key
1acb48c9 969 my $glob = readvar($perlvars_h);
51371543
GS
970 emit_symbols $glob;
971 }
972}
973else {
974 unless ($define{'PERL_GLOBAL_STRUCT'}) {
549a6b10 975 my $glob = readvar($perlvars_h);
51371543 976 emit_symbols $glob;
9df9a5cd 977 }
51371543 978 unless ($define{'MULTIPLICITY'}) {
549a6b10 979 my $glob = readvar($intrpvar_h);
51371543 980 emit_symbols $glob;
9df9a5cd 981 }
bbda9c9d 982 unless ($define{'MULTIPLICITY'} || $define{'USE_5005THREADS'}) {
549a6b10 983 my $glob = readvar($thrdvar_h);
51371543 984 emit_symbols $glob;
9df9a5cd 985 }
51371543 986}
0a753a76 987
549a6b10
JH
988sub try_symbol {
989 my $symbol = shift;
22239a37 990
4d6b4052 991 return if $symbol !~ /^[A-Za-z_]/;
549a6b10
JH
992 return if $symbol =~ /^\#/;
993 $symbol =~s/\r//g;
994 chomp($symbol);
43cd9f80 995 return if exists $skip{$symbol};
549a6b10 996 emit_symbol($symbol);
3e3baf6d 997}
0a753a76 998
549a6b10
JH
999while (<DATA>) {
1000 try_symbol($_);
ac4c12e7
GS
1001}
1002
18f68570 1003if ($PLATFORM =~ /^win(?:32|ce)$/) {
549a6b10 1004 foreach my $symbol (qw(
00b02797
JH
1005 setuid
1006 setgid
7766f137 1007 boot_DynaLoader
7766f137 1008 Perl_init_os_extras
c44d3fdb 1009 Perl_thread_create
7766f137 1010 Perl_win32_init
0710cc63 1011 Perl_win32_term
7766f137 1012 RunPerl
5290524f 1013 win32_async_check
7766f137
GS
1014 win32_errno
1015 win32_environ
7766f137
GS
1016 win32_abort
1017 win32_fstat
1018 win32_stat
1019 win32_pipe
1020 win32_popen
1021 win32_pclose
1022 win32_rename
1023 win32_setmode
1024 win32_lseek
1025 win32_tell
1026 win32_dup
1027 win32_dup2
1028 win32_open
1029 win32_close
1030 win32_eof
1031 win32_read
1032 win32_write
1033 win32_spawnvp
1034 win32_mkdir
1035 win32_rmdir
1036 win32_chdir
1037 win32_flock
1038 win32_execv
1039 win32_execvp
1040 win32_htons
1041 win32_ntohs
1042 win32_htonl
1043 win32_ntohl
1044 win32_inet_addr
1045 win32_inet_ntoa
1046 win32_socket
1047 win32_bind
1048 win32_listen
1049 win32_accept
1050 win32_connect
1051 win32_send
1052 win32_sendto
1053 win32_recv
1054 win32_recvfrom
1055 win32_shutdown
1056 win32_closesocket
1057 win32_ioctlsocket
1058 win32_setsockopt
1059 win32_getsockopt
1060 win32_getpeername
1061 win32_getsockname
1062 win32_gethostname
1063 win32_gethostbyname
1064 win32_gethostbyaddr
1065 win32_getprotobyname
1066 win32_getprotobynumber
1067 win32_getservbyname
1068 win32_getservbyport
1069 win32_select
1070 win32_endhostent
1071 win32_endnetent
1072 win32_endprotoent
1073 win32_endservent
1074 win32_getnetent
1075 win32_getnetbyname
1076 win32_getnetbyaddr
1077 win32_getprotoent
1078 win32_getservent
1079 win32_sethostent
1080 win32_setnetent
1081 win32_setprotoent
1082 win32_setservent
1083 win32_getenv
1084 win32_putenv
1085 win32_perror
7766f137
GS
1086 win32_malloc
1087 win32_calloc
1088 win32_realloc
1089 win32_free
1090 win32_sleep
1091 win32_times
1092 win32_access
1093 win32_alarm
1094 win32_chmod
1095 win32_open_osfhandle
1096 win32_get_osfhandle
1097 win32_ioctl
1098 win32_link
1099 win32_unlink
1100 win32_utime
57ab3dfe 1101 win32_gettimeofday
7766f137
GS
1102 win32_uname
1103 win32_wait
1104 win32_waitpid
1105 win32_kill
1106 win32_str_os_error
1107 win32_opendir
1108 win32_readdir
1109 win32_telldir
1110 win32_seekdir
1111 win32_rewinddir
1112 win32_closedir
1113 win32_longpath
1114 win32_os_id
1115 win32_getpid
1116 win32_crypt
1117 win32_dynaload
df3728a2
JH
1118 win32_get_childenv
1119 win32_free_childenv
1120 win32_clearenv
1121 win32_get_childdir
1122 win32_free_childdir
00b02797
JH
1123 win32_stdin
1124 win32_stdout
1125 win32_stderr
1126 win32_ferror
1127 win32_feof
1128 win32_strerror
1129 win32_fprintf
1130 win32_printf
1131 win32_vfprintf
1132 win32_vprintf
1133 win32_fread
1134 win32_fwrite
1135 win32_fopen
1136 win32_fdopen
1137 win32_freopen
1138 win32_fclose
1139 win32_fputs
1140 win32_fputc
1141 win32_ungetc
1142 win32_getc
1143 win32_fileno
1144 win32_clearerr
1145 win32_fflush
1146 win32_ftell
1147 win32_fseek
1148 win32_fgetpos
1149 win32_fsetpos
1150 win32_rewind
1151 win32_tmpfile
1152 win32_setbuf
1153 win32_setvbuf
1154 win32_flushall
1155 win32_fcloseall
1156 win32_fgets
1157 win32_gets
1158 win32_fgetc
1159 win32_putc
1160 win32_puts
1161 win32_getchar
1162 win32_putchar
7766f137
GS
1163 ))
1164 {
549a6b10
JH
1165 try_symbol($symbol);
1166 }
1167}
3cfae81b 1168elsif ($PLATFORM eq 'os2') {
7766f137
GS
1169 open MAP, 'miniperl.map' or die 'Cannot read miniperl.map';
1170 /^\s*[\da-f:]+\s+(\w+)/i and $mapped{$1}++ foreach <MAP>;
1171 close MAP or die 'Cannot close miniperl.map';
1172
ad6971c8 1173 @missing = grep { !exists $mapped{$_} }
7766f137 1174 keys %export;
c6261f3b 1175 @missing = grep { !exists $exportperlmalloc{$_} } @missing;
7766f137 1176 delete $export{$_} foreach @missing;
3cfae81b 1177}
084592ab
CN
1178elsif ($PLATFORM eq 'MacOS') {
1179 open MACSYMS, 'macperl.sym' or die 'Cannot read macperl.sym';
1180
1181 while (<MACSYMS>) {
1182 try_symbol($_);
1183 }
1184
1185 close MACSYMS;
1186}
2986a63f
JH
1187elsif ($PLATFORM eq 'netware') {
1188foreach my $symbol (qw(
1189 boot_DynaLoader
1190 Perl_init_os_extras
1191 Perl_thread_create
1192 Perl_nw5_init
1193 RunPerl
1194 AllocStdPerl
1195 FreeStdPerl
1196 do_spawn2
1197 do_aspawn
1198 nw_uname
1199 nw_stdin
1200 nw_stdout
1201 nw_stderr
1202 nw_feof
1203 nw_ferror
1204 nw_fopen
1205 nw_fclose
1206 nw_clearerr
1207 nw_getc
1208 nw_fgets
1209 nw_fputc
1210 nw_fputs
1211 nw_fflush
1212 nw_ungetc
1213 nw_fileno
1214 nw_fdopen
1215 nw_freopen
1216 nw_fread
1217 nw_fwrite
1218 nw_setbuf
1219 nw_setvbuf
1220 nw_vfprintf
1221 nw_ftell
1222 nw_fseek
1223 nw_rewind
1224 nw_tmpfile
1225 nw_fgetpos
1226 nw_fsetpos
1227 nw_dup
1228 nw_access
1229 nw_chmod
1230 nw_chsize
1231 nw_close
1232 nw_dup2
1233 nw_flock
1234 nw_isatty
1235 nw_link
1236 nw_lseek
1237 nw_stat
1238 nw_mktemp
1239 nw_open
1240 nw_read
1241 nw_rename
1242 nw_setmode
1243 nw_unlink
1244 nw_utime
1245 nw_write
1246 nw_chdir
1247 nw_rmdir
1248 nw_closedir
1249 nw_opendir
1250 nw_readdir
1251 nw_rewinddir
1252 nw_seekdir
1253 nw_telldir
1254 nw_htonl
1255 nw_htons
1256 nw_ntohl
1257 nw_ntohs
1258 nw_accept
1259 nw_bind
1260 nw_connect
1261 nw_endhostent
1262 nw_endnetent
1263 nw_endprotoent
1264 nw_endservent
1265 nw_gethostbyaddr
1266 nw_gethostbyname
1267 nw_gethostent
1268 nw_gethostname
1269 nw_getnetbyaddr
1270 nw_getnetbyname
1271 nw_getnetent
1272 nw_getpeername
1273 nw_getprotobyname
1274 nw_getprotobynumber
1275 nw_getprotoent
1276 nw_getservbyname
1277 nw_getservbyport
1278 nw_getservent
1279 nw_getsockname
1280 nw_getsockopt
1281 nw_inet_addr
1282 nw_listen
1283 nw_socket
1284 nw_recv
1285 nw_recvfrom
1286 nw_select
1287 nw_send
1288 nw_sendto
1289 nw_sethostent
1290 nw_setnetent
1291 nw_setprotoent
1292 nw_setservent
3a0827a6 1293 nw_setsockopt
4d76e4b4 1294 nw_inet_ntoa
2986a63f
JH
1295 nw_shutdown
1296 nw_crypt
1297 nw_execvp
1298 nw_kill
1299 nw_Popen
1300 nw_Pclose
1301 nw_Pipe
1302 nw_times
1303 nw_waitpid
1304 nw_getpid
1305 nw_spawnvp
1306 nw_os_id
1307 nw_open_osfhandle
1308 nw_get_osfhandle
1309 nw_abort
1310 nw_sleep
1311 nw_wait
1312 nw_dynaload
1313 nw_strerror
1314 fnFpSetMode
1315 fnInsertHashListAddrs
1316 fnGetHashListAddrs
1317 Perl_deb
011f1a1a
JH
1318 Perl_sv_setsv
1319 Perl_sv_catsv
1320 Perl_sv_catpvn
1321 Perl_sv_2pv
f355267c
JH
1322 nw_freeenviron
1323 Remove_Thread_Ctx
2986a63f
JH
1324 ))
1325 {
1326 try_symbol($symbol);
1327 }
1328}
22239a37 1329
549a6b10
JH
1330# Now all symbols should be defined because
1331# next we are going to output them.
1332
7766f137
GS
1333foreach my $symbol (sort keys %export) {
1334 output_symbol($symbol);
1335}
549a6b10 1336
011f1a1a 1337if ($PLATFORM eq 'os2') {
52e4c282 1338 print "; LAST_ORDINAL=$sym_ord\n";
2986a63f
JH
1339}
1340
549a6b10 1341sub emit_symbol {
7766f137 1342 my $symbol = shift;
9df9a5cd 1343 chomp($symbol);
7766f137 1344 $export{$symbol} = 1;
549a6b10
JH
1345}
1346
1347sub output_symbol {
1348 my $symbol = shift;
18f68570 1349 if ($PLATFORM =~ /^win(?:32|ce)$/) {
549a6b10 1350 $symbol = "_$symbol" if $CCTYPE eq 'BORLAND';
520c758a 1351 print "\t$symbol\n";
549a6b10
JH
1352# XXX: binary compatibility between compilers is an exercise
1353# in frustration :-(
1354# if ($CCTYPE eq "BORLAND") {
1355# # workaround Borland quirk by exporting both the straight
1356# # name and a name with leading underscore. Note the
1357# # alias *must* come after the symbol itself, if both
1358# # are to be exported. (Linker bug?)
1359# print "\t_$symbol\n";
1360# print "\t$symbol = _$symbol\n";
1361# }
1362# elsif ($CCTYPE eq 'GCC') {
1363# # Symbols have leading _ whole process is $%@"% slow
1364# # so skip aliases for now
1365# nprint "\t$symbol\n";
1366# }
1367# else {
1368# # for binary coexistence, export both the symbol and
1369# # alias with leading underscore
1370# print "\t$symbol\n";
1371# print "\t_$symbol = $symbol\n";
1372# }
7766f137
GS
1373 }
1374 elsif ($PLATFORM eq 'os2') {
52e4c282
IZ
1375 printf qq( %-31s \@%s\n),
1376 qq("$symbol"), $ordinal{$symbol} || ++$sym_ord;
78232bc0
JH
1377 printf qq( %-31s \@%s\n),
1378 qq("$exportperlmalloc{$symbol}" = "$symbol"),
1379 $ordinal{$exportperlmalloc{$symbol}} || ++$sym_ord
1380 if $exportperlmalloc and exists $exportperlmalloc{$symbol};
7766f137 1381 }
084592ab 1382 elsif ($PLATFORM eq 'aix' || $PLATFORM eq 'MacOS') {
549a6b10
JH
1383 print "$symbol\n";
1384 }
2986a63f
JH
1385 elsif ($PLATFORM eq 'netware') {
1386 print "\t$symbol,\n";
1387 }
549a6b10
JH
1388}
1389
13901;
1391__DATA__
1392# extra globals not included above.
8437356b 1393Perl_cxinc
549a6b10 1394perl_alloc
7766f137 1395perl_alloc_using
014822e4
GS
1396perl_clone
1397perl_clone_using
549a6b10
JH
1398perl_construct
1399perl_destruct
1400perl_free
1401perl_parse
1402perl_run
44798d05 1403# Oddities from PerlIO
568ad336 1404PerlIO_binmode
8437356b 1405PerlIO_getpos
568ad336 1406PerlIO_init
568ad336 1407PerlIO_setpos
568ad336 1408PerlIO_sprintf
8437356b
MB
1409PerlIO_sv_dup
1410PerlIO_tmpfile
8437356b
MB
1411PerlIO_vsprintf
1412perlsio_binmode