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