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