enable function wrappers for access to globals under MULTIPLICITY
[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 #
7 # reads global.sym, pp.sym, perlvars.h, intrpvar.h, thrdvar.h, config.h
8 # On OS/2 reads miniperl.map as well
9
10 my $PLATFORM;
11 my $CCTYPE;
12
13 my %bincompat5005 =
14       (Perl_call_argv           =>      "perl_call_argv",
15        Perl_call_method         =>      "perl_call_method",
16        Perl_call_pv             =>      "perl_call_pv",
17        Perl_call_sv             =>      "perl_call_sv",
18        Perl_get_av              =>      "perl_get_av",
19        Perl_get_cv              =>      "perl_get_cv",
20        Perl_get_hv              =>      "perl_get_hv",
21        Perl_get_sv              =>      "perl_get_sv",
22        Perl_init_i18nl10n       =>      "perl_init_i18nl10n",
23        Perl_init_i18nl14n       =>      "perl_init_i18nl14n",
24        Perl_new_collate         =>      "perl_new_collate",
25        Perl_new_ctype           =>      "perl_new_ctype",
26        Perl_new_numeric         =>      "perl_new_numeric",
27        Perl_require_pv          =>      "perl_require_pv",
28        Perl_safesyscalloc       =>      "Perl_safecalloc",
29        Perl_safesysfree         =>      "Perl_safefree",
30        Perl_safesysmalloc       =>      "Perl_safemalloc",
31        Perl_safesysrealloc      =>      "Perl_saferealloc",
32        Perl_set_numeric_local   =>      "perl_set_numeric_local",
33        Perl_set_numeric_standard  =>    "perl_set_numeric_standard",
34        Perl_malloc              =>      "malloc",
35        Perl_mfree               =>      "free",
36        Perl_realloc             =>      "realloc",
37        Perl_calloc              =>      "calloc",);
38
39 my $bincompat5005 = join("|", keys %bincompat5005);
40
41 while (@ARGV) {
42     my $flag = shift;
43     $define{$1} = 1 if ($flag =~ /^-D(\w+)$/);
44     $define{$1} = $2 if ($flag =~ /^-D(\w+)=(.+)$/);
45     $CCTYPE   = $1 if ($flag =~ /^CCTYPE=(\w+)$/);
46     $PLATFORM = $1 if ($flag =~ /^PLATFORM=(\w+)$/);
47 }
48
49 my @PLATFORM = qw(aix win32 os2);
50 my %PLATFORM;
51 @PLATFORM{@PLATFORM} = ();
52
53 defined $PLATFORM || die "PLATFORM undefined, must be one of: @PLATFORM\n";
54 exists $PLATFORM{$PLATFORM} || die "PLATFORM must be one of: @PLATFORM\n"; 
55
56 my $config_sh   = "config.sh";
57 my $config_h    = "config.h";
58 my $thrdvar_h   = "thrdvar.h";
59 my $intrpvar_h  = "intrpvar.h";
60 my $perlvars_h  = "perlvars.h";
61 my $global_sym  = "global.sym";
62 my $pp_sym      = "pp.sym";
63 my $globvar_sym = "globvar.sym";
64 my $perlio_sym  = "perlio.sym";
65
66 if ($PLATFORM eq 'aix') { 
67     # Nothing for now.
68 }
69 elsif ($PLATFORM eq 'win32') {
70     $CCTYPE = "MSVC" unless defined $CCTYPE;
71     foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym, $pp_sym, $globvar_sym) {
72         s!^!..\\!;
73     }
74 }
75
76 unless ($PLATFORM eq 'win32') {
77     open(CFG,$config_sh) || die "Cannot open $config_sh: $!\n";
78     while (<CFG>) {
79         if (/^(?:ccflags|optimize)='(.+)'$/) {
80             $_ = $1;
81             $define{$1} = 1 while /-D(\w+)/g;
82         }
83         if ($PLATFORM eq 'os2') {
84             $CONFIG_ARGS = $1 if /^(?:config_args)='(.+)'$/;
85             $ARCHNAME = $1 if /^(?:archname)='(.+)'$/;
86         }
87     }
88     close(CFG);
89 }
90
91 open(CFG,$config_h) || die "Cannot open $config_h: $!\n";
92 while (<CFG>) {
93     $define{$1} = 1 if /^\s*#\s*define\s+(MYMALLOC)\b/;
94     $define{$1} = 1 if /^\s*#\s*define\s+(USE_5005THREADS)\b/;
95     $define{$1} = 1 if /^\s*#\s*define\s+(USE_ITHREADS)\b/;
96     $define{$1} = 1 if /^\s*#\s*define\s+(USE_PERLIO)\b/;
97     $define{$1} = 1 if /^\s*#\s*define\s+(MULTIPLICITY)\b/;
98     $define{$1} = 1 if /^\s*#\s*define\s+(PERL_BINCOMPAT_5005)\b/;
99 }
100 close(CFG);
101
102 if ($PLATFORM eq 'win32') {
103     warn join(' ',keys %define)."\n";
104     if ($define{PERL_OBJECT}) {
105         print "LIBRARY Perl56\n";
106         print "DESCRIPTION 'Perl interpreter'\n";
107         print "EXPORTS\n";
108 #    output_symbol("perl_alloc");
109         output_symbol("perl_get_host_info");
110         output_symbol("perl_alloc_override");
111 #    output_symbol("perl_construct");
112 #    output_symbol("perl_destruct");
113 #    output_symbol("perl_free");
114 #    output_symbol("perl_parse");
115 #    output_symbol("perl_run");
116 #    output_symbol("RunPerl");
117 #    exit(0);
118     }
119     else {
120         print "LIBRARY Perl\n";
121         print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
122         print "EXPORTS\n";
123     } 
124 }
125 elsif ($PLATFORM eq 'os2') {
126     ($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/;
127     $v .= '-thread' if $ARCHNAME =~ /-thread/;
128     #$sum = 0;
129     #for (split //, $v) {
130     #   $sum = ($sum * 33) + ord;
131     #   $sum &= 0xffffff;
132     #}
133     #$sum += $sum >> 5;
134     #$sum &= 0xffff;
135     #$sum = printf '%X', $sum;
136     ($dll = $define{PERL_DLL}) =~ s/\.dll$//i;
137     # print STDERR "'$dll' <= '$define{PERL_DLL}'\n";
138     print <<"---EOP---";
139 LIBRARY '$dll' INITINSTANCE TERMINSTANCE
140 DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'
141 STACKSIZE 32768
142 CODE LOADONCALL
143 DATA LOADONCALL NONSHARED MULTIPLE
144 EXPORTS
145 ---EOP---
146 }
147 elsif ($PLATFORM eq 'aix') {
148     print "#!\n";
149 }
150
151 my %skip;
152 my %export;
153
154 sub skip_symbols {
155     my $list = shift;
156     foreach my $symbol (@$list) {
157         $skip{$symbol} = 1;
158     }
159 }
160
161 sub emit_symbols {
162     my $list = shift;
163     foreach my $symbol (@$list) {
164         my $skipsym = $symbol;
165         # XXX hack
166         if ($define{PERL_OBJECT} || $define{MULTIPLICITY}) {
167             $skipsym =~ s/^Perl_[GIT](\w+)_ptr$/PL_$1/;
168         }
169         emit_symbol($symbol) unless exists $skip{$skipsym};
170     }
171 }
172
173 if ($PLATFORM eq 'win32') {
174     skip_symbols [qw(
175                      PL_statusvalue_vms
176                      PL_archpat_auto
177                      PL_cryptseen
178                      PL_DBcv
179                      PL_generation
180                      PL_lastgotoprobe
181                      PL_linestart
182                      PL_modcount
183                      PL_pending_ident
184                      PL_sortcxix
185                      PL_sublex_info
186                      PL_timesbuf
187                      main
188                      Perl_ErrorNo
189                      Perl_GetVars
190                      Perl_do_exec3
191                      Perl_do_ipcctl
192                      Perl_do_ipcget
193                      Perl_do_msgrcv
194                      Perl_do_msgsnd
195                      Perl_do_semop
196                      Perl_do_shmio
197                      Perl_dump_fds
198                      Perl_init_thread_intern
199                      Perl_my_bzero
200                      Perl_my_htonl
201                      Perl_my_ntohl
202                      Perl_my_swap
203                      Perl_my_chsize
204                      Perl_same_dirent
205                      Perl_setenv_getix
206                      Perl_unlnk
207                      Perl_watch
208                      Perl_safexcalloc
209                      Perl_safexmalloc
210                      Perl_safexfree
211                      Perl_safexrealloc
212                      Perl_my_memcmp
213                      Perl_my_memset
214                      PL_cshlen
215                      PL_cshname
216                      PL_opsave
217                      Perl_do_exec
218                      Perl_getenv_len
219                      Perl_my_pclose
220                      Perl_my_popen
221                      )];
222 }
223 elsif ($PLATFORM eq 'aix') {
224     skip_symbols([qw(
225                      Perl_dump_fds
226                      Perl_ErrorNo
227                      Perl_GetVars
228                      Perl_my_bcopy
229                      Perl_my_bzero
230                      Perl_my_chsize
231                      Perl_my_htonl
232                      Perl_my_memcmp
233                      Perl_my_memset
234                      Perl_my_ntohl
235                      Perl_my_swap
236                      Perl_safexcalloc
237                      Perl_safexfree
238                      Perl_safexmalloc
239                      Perl_safexrealloc
240                      Perl_same_dirent
241                      Perl_unlnk
242                      PL_cryptseen
243                      PL_opsave
244                      PL_statusvalue_vms
245                      PL_sys_intern
246                      )]);
247 }
248 elsif ($PLATFORM eq 'os2') {
249     emit_symbols([qw(
250                     ctermid
251                     get_sysinfo
252                     Perl_OS2_init
253                     OS2_Perl_data
254                     dlopen
255                     dlsym
256                     dlerror
257                     my_tmpfile
258                     my_tmpnam
259                     my_flock
260                     malloc_mutex
261                     threads_mutex
262                     nthreads
263                     nthreads_cond
264                     os2_cond_wait
265                     os2_stat
266                     pthread_join
267                     pthread_create
268                     pthread_detach
269                     XS_Cwd_change_drive
270                     XS_Cwd_current_drive
271                     XS_Cwd_extLibpath
272                     XS_Cwd_extLibpath_set
273                     XS_Cwd_sys_abspath
274                     XS_Cwd_sys_chdir
275                     XS_Cwd_sys_cwd
276                     XS_Cwd_sys_is_absolute
277                     XS_Cwd_sys_is_relative
278                     XS_Cwd_sys_is_rooted
279                     XS_DynaLoader_mod2fname
280                     XS_File__Copy_syscopy
281                     Perl_Register_MQ
282                     Perl_Deregister_MQ
283                     Perl_Serve_Messages
284                     Perl_Process_Messages
285                     init_PMWIN_entries
286                     PMWIN_entries
287                     Perl_hab_GET
288                     )]);
289 }
290
291 unless ($define{'DEBUGGING'}) {
292     skip_symbols [qw(
293                     Perl_deb
294                     Perl_deb_growlevel
295                     Perl_debop
296                     Perl_debprofdump
297                     Perl_debstack
298                     Perl_debstackptrs
299                     Perl_runops_debug
300                     Perl_sv_peek
301                     PL_block_type
302                     PL_watchaddr
303                     PL_watchok
304                     )];
305 }
306
307 if ($define{'PERL_IMPLICIT_SYS'}) {
308     skip_symbols [qw(
309                     Perl_getenv_len
310                     Perl_my_popen
311                     Perl_my_pclose
312                     )];
313 }
314 else {
315     skip_symbols [qw(
316                     PL_Mem
317                     PL_MemShared
318                     PL_MemParse
319                     PL_Env
320                     PL_StdIO
321                     PL_LIO
322                     PL_Dir
323                     PL_Sock
324                     PL_Proc
325                     )];
326 }
327
328 if ($define{'MYMALLOC'}) {
329     emit_symbols [qw(
330                     Perl_dump_mstats
331                     Perl_malloc
332                     Perl_mfree
333                     Perl_realloc
334                     Perl_calloc
335                     )];
336     if ($define{'USE_5005THREADS'} || $define{'USE_ITHREADS'}) {
337         emit_symbols [qw(
338                         PL_malloc_mutex
339                         )];
340     }
341 }
342 else {
343     skip_symbols [qw(
344                     PL_malloc_mutex
345                     Perl_dump_mstats
346                     Perl_malloc
347                     Perl_mfree
348                     Perl_realloc
349                     Perl_calloc
350                     Perl_malloced_size
351                     )];
352 }
353
354 unless ($define{'USE_5005THREADS'}) {
355     skip_symbols [qw(
356                     PL_thr_key
357                     PL_sv_mutex
358                     PL_strtab_mutex
359                     PL_svref_mutex
360                     PL_cred_mutex
361                     PL_eval_mutex
362                     PL_eval_cond
363                     PL_eval_owner
364                     PL_threads_mutex
365                     PL_nthreads
366                     PL_nthreads_cond
367                     PL_threadnum
368                     PL_threadsv_names
369                     PL_thrsv
370                     PL_vtbl_mutex
371                     Perl_getTHR
372                     Perl_setTHR
373                     Perl_condpair_magic
374                     Perl_new_struct_thread
375                     Perl_per_thread_magicals
376                     Perl_thread_create
377                     Perl_find_threadsv
378                     Perl_unlock_condpair
379                     Perl_magic_mutexfree
380                     )];
381 }
382
383 unless ($define{'USE_ITHREADS'}) {
384     skip_symbols [qw(
385                     PL_ptr_table
386                     Perl_dirp_dup
387                     Perl_cx_dup
388                     Perl_si_dup
389                     Perl_any_dup
390                     Perl_ss_dup
391                     Perl_fp_dup
392                     Perl_gp_dup
393                     Perl_he_dup
394                     Perl_mg_dup
395                     Perl_re_dup
396                     Perl_sv_dup
397                     Perl_sys_intern_dup
398                     Perl_ptr_table_fetch
399                     Perl_ptr_table_new
400                     Perl_ptr_table_split
401                     Perl_ptr_table_store
402                     perl_clone
403                     perl_clone_using
404                     )];
405 }
406
407 unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
408     skip_symbols [qw(
409                     Perl_croak_nocontext
410                     Perl_die_nocontext
411                     Perl_deb_nocontext
412                     Perl_form_nocontext
413                     Perl_mess_nocontext
414                     Perl_warn_nocontext
415                     Perl_warner_nocontext
416                     Perl_newSVpvf_nocontext
417                     Perl_sv_catpvf_nocontext
418                     Perl_sv_setpvf_nocontext
419                     Perl_sv_catpvf_mg_nocontext
420                     Perl_sv_setpvf_mg_nocontext
421                     )];
422 }
423
424 unless ($define{'PERL_IMPLICIT_SYS'}) {
425     skip_symbols [qw(
426                     perl_alloc_using
427                     perl_clone_using
428                     )];
429 }
430
431 unless ($define{'FAKE_THREADS'}) {
432     skip_symbols [qw(PL_curthr)];
433 }
434
435 sub readvar {
436     my $file = shift;
437     my $proc = shift || sub { "PL_$_[2]" };
438     open(VARS,$file) || die "Cannot open $file: $!\n";
439     my @syms;
440     while (<VARS>) {
441         # All symbols have a Perl_ prefix because that's what embed.h
442         # sticks in front of them.
443         push(@syms, &$proc($1,$2,$3)) if (/\bPERLVAR(A?I?C?)\(([IGT])(\w+)/);
444     } 
445     close(VARS); 
446     return \@syms;
447 }
448
449 if ($define{'USE_5005THREADS'}) {
450     my $thrd = readvar($thrdvar_h);
451     skip_symbols $thrd;
452 }
453
454 if ($define{'PERL_GLOBAL_STRUCT'}) {
455     my $global = readvar($perlvars_h);
456     skip_symbols $global;
457     emit_symbol('Perl_GetVars');
458     emit_symbols [qw(PL_Vars PL_VarsPtr)] unless $CCTYPE eq 'GCC';
459 }
460
461 # functions from *.sym files
462
463 my @syms = ($global_sym, $pp_sym, $globvar_sym);
464
465 if ($define{'USE_PERLIO'}) {
466      push @syms, $perlio_sym;
467 }
468
469 for my $syms (@syms) {
470     open (GLOBAL, "<$syms") || die "failed to open $syms: $!\n";
471     while (<GLOBAL>) {
472         next if (!/^[A-Za-z]/);
473         # Functions have a Perl_ prefix
474         # Variables have a PL_ prefix
475         chomp($_);
476         my $symbol = ($syms =~ /var\.sym$/i ? "PL_" : "");
477         $symbol .= $_;
478         emit_symbol($symbol) unless exists $skip{$symbol};
479     }
480     close(GLOBAL);
481 }
482
483 # variables
484
485 if ($define{'PERL_OBJECT'} || $define{'MULTIPLICITY'}) {
486     for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
487         my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
488         emit_symbols $glob;
489     }
490 }
491 else {
492     unless ($define{'PERL_GLOBAL_STRUCT'}) {
493         my $glob = readvar($perlvars_h);
494         emit_symbols $glob;
495     } 
496     unless ($define{'MULTIPLICITY'}) {
497         my $glob = readvar($intrpvar_h);
498         emit_symbols $glob;
499     } 
500     unless ($define{'MULTIPLICITY'} || $define{'USE_5005THREADS'}) {
501         my $glob = readvar($thrdvar_h);
502         emit_symbols $glob;
503     } 
504 }
505
506 sub try_symbol {
507     my $symbol = shift;
508
509     return if $symbol !~ /^[A-Za-z]/;
510     return if $symbol =~ /^\#/;
511     $symbol =~s/\r//g;
512     chomp($symbol);
513     return if exists $skip{$symbol};
514     emit_symbol($symbol);
515 }
516
517 while (<DATA>) {
518     try_symbol($_);
519 }
520
521 if ($PLATFORM eq 'win32') {
522     foreach my $symbol (qw(
523                             boot_DynaLoader
524                             Perl_getTHR
525                             Perl_init_os_extras
526                             Perl_setTHR
527                             Perl_thread_create
528                             Perl_win32_init
529                             RunPerl
530                             GetPerlInterpreter
531                             SetPerlInterpreter
532                             win32_errno
533                             win32_environ
534                             win32_stdin
535                             win32_stdout
536                             win32_stderr
537                             win32_ferror
538                             win32_feof
539                             win32_strerror
540                             win32_fprintf
541                             win32_printf
542                             win32_vfprintf
543                             win32_vprintf
544                             win32_fread
545                             win32_fwrite
546                             win32_fopen
547                             win32_fdopen
548                             win32_freopen
549                             win32_fclose
550                             win32_fputs
551                             win32_fputc
552                             win32_ungetc
553                             win32_getc
554                             win32_fileno
555                             win32_clearerr
556                             win32_fflush
557                             win32_ftell
558                             win32_fseek
559                             win32_fgetpos
560                             win32_fsetpos
561                             win32_rewind
562                             win32_tmpfile
563                             win32_abort
564                             win32_fstat
565                             win32_stat
566                             win32_pipe
567                             win32_popen
568                             win32_pclose
569                             win32_rename
570                             win32_setmode
571                             win32_lseek
572                             win32_tell
573                             win32_dup
574                             win32_dup2
575                             win32_open
576                             win32_close
577                             win32_eof
578                             win32_read
579                             win32_write
580                             win32_spawnvp
581                             win32_mkdir
582                             win32_rmdir
583                             win32_chdir
584                             win32_flock
585                             win32_execv
586                             win32_execvp
587                             win32_htons
588                             win32_ntohs
589                             win32_htonl
590                             win32_ntohl
591                             win32_inet_addr
592                             win32_inet_ntoa
593                             win32_socket
594                             win32_bind
595                             win32_listen
596                             win32_accept
597                             win32_connect
598                             win32_send
599                             win32_sendto
600                             win32_recv
601                             win32_recvfrom
602                             win32_shutdown
603                             win32_closesocket
604                             win32_ioctlsocket
605                             win32_setsockopt
606                             win32_getsockopt
607                             win32_getpeername
608                             win32_getsockname
609                             win32_gethostname
610                             win32_gethostbyname
611                             win32_gethostbyaddr
612                             win32_getprotobyname
613                             win32_getprotobynumber
614                             win32_getservbyname
615                             win32_getservbyport
616                             win32_select
617                             win32_endhostent
618                             win32_endnetent
619                             win32_endprotoent
620                             win32_endservent
621                             win32_getnetent
622                             win32_getnetbyname
623                             win32_getnetbyaddr
624                             win32_getprotoent
625                             win32_getservent
626                             win32_sethostent
627                             win32_setnetent
628                             win32_setprotoent
629                             win32_setservent
630                             win32_getenv
631                             win32_putenv
632                             win32_perror
633                             win32_setbuf
634                             win32_setvbuf
635                             win32_flushall
636                             win32_fcloseall
637                             win32_fgets
638                             win32_gets
639                             win32_fgetc
640                             win32_putc
641                             win32_puts
642                             win32_getchar
643                             win32_putchar
644                             win32_malloc
645                             win32_calloc
646                             win32_realloc
647                             win32_free
648                             win32_sleep
649                             win32_times
650                             win32_access
651                             win32_alarm
652                             win32_chmod
653                             win32_open_osfhandle
654                             win32_get_osfhandle
655                             win32_ioctl
656                             win32_link
657                             win32_unlink
658                             win32_utime
659                             win32_uname
660                             win32_wait
661                             win32_waitpid
662                             win32_kill
663                             win32_str_os_error
664                             win32_opendir
665                             win32_readdir
666                             win32_telldir
667                             win32_seekdir
668                             win32_rewinddir
669                             win32_closedir
670                             win32_longpath
671                             win32_os_id
672                             win32_getpid
673                             win32_crypt
674                             win32_dynaload
675                            ))
676     {
677         try_symbol($symbol);
678     }
679 }
680 elsif ($PLATFORM eq 'os2') {
681     open MAP, 'miniperl.map' or die 'Cannot read miniperl.map';
682     /^\s*[\da-f:]+\s+(\w+)/i and $mapped{$1}++ foreach <MAP>;
683     close MAP or die 'Cannot close miniperl.map';
684
685     @missing = grep { !exists $mapped{$_} and !exists $bincompat5005{$_} }
686                     keys %export;
687     delete $export{$_} foreach @missing;
688 }
689
690 # Now all symbols should be defined because
691 # next we are going to output them.
692
693 foreach my $symbol (sort keys %export) {
694     output_symbol($symbol);
695 }
696
697 sub emit_symbol {
698     my $symbol = shift;
699     chomp($symbol); 
700     $export{$symbol} = 1;
701 }
702
703 sub output_symbol {
704     my $symbol = shift;
705     $symbol = $bincompat5005{$symbol}
706         if $define{PERL_BINCOMPAT_5005} and $symbol =~ /^($bincompat5005)$/;
707     if ($PLATFORM eq 'win32') {
708         $symbol = "_$symbol" if $CCTYPE eq 'BORLAND';
709         print "\t$symbol\n";
710 # XXX: binary compatibility between compilers is an exercise
711 # in frustration :-(
712 #        if ($CCTYPE eq "BORLAND") {
713 #           # workaround Borland quirk by exporting both the straight
714 #           # name and a name with leading underscore.  Note the
715 #           # alias *must* come after the symbol itself, if both
716 #           # are to be exported. (Linker bug?)
717 #           print "\t_$symbol\n";
718 #           print "\t$symbol = _$symbol\n";
719 #       }
720 #       elsif ($CCTYPE eq 'GCC') {
721 #           # Symbols have leading _ whole process is $%@"% slow
722 #           # so skip aliases for now
723 #           nprint "\t$symbol\n";
724 #       }
725 #       else {
726 #           # for binary coexistence, export both the symbol and
727 #           # alias with leading underscore
728 #           print "\t$symbol\n";
729 #           print "\t_$symbol = $symbol\n";
730 #       }
731     }
732     elsif ($PLATFORM eq 'os2') {
733         print qq(    "$symbol"\n);
734     }
735     elsif ($PLATFORM eq 'aix') {
736         print "$symbol\n";
737     }
738 }
739
740 1;
741 __DATA__
742 # extra globals not included above.
743 perl_alloc
744 perl_alloc_using
745 perl_clone
746 perl_clone_using
747 perl_construct
748 perl_destruct
749 perl_free
750 perl_parse
751 perl_run