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