This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix diagnostics to report "our" vs "my" correctly
[perl5.git] / makedef.pl
CommitLineData
549a6b10
JH
1#
2# Create the export list for perl.
3#
3cfae81b
IZ
4# Needed by WIN32 and OS/2 for creating perl.dll
5# and by AIX for creating libperl.a when -Dusershrplib is in effect.
549a6b10 6#
22c35a8c 7# reads global.sym, pp.sym, perlvars.h, intrpvar.h, thrdvar.h, config.h
3cfae81b 8# On OS/2 reads miniperl.map as well
0a753a76 9
549a6b10
JH
10my $PLATFORM;
11my $CCTYPE;
910dfcc8 12
4cb71bb6
GS
13my %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",
62457c2b
IZ
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",);
4cb71bb6
GS
38
39my $bincompat5005 = join("|", keys %bincompat5005);
40
7766f137
GS
41while (@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}
d55594ae 48
3cfae81b 49my @PLATFORM = qw(aix win32 os2);
549a6b10
JH
50my %PLATFORM;
51@PLATFORM{@PLATFORM} = ();
52
53defined $PLATFORM || die "PLATFORM undefined, must be one of: @PLATFORM\n";
54exists $PLATFORM{$PLATFORM} || die "PLATFORM must be one of: @PLATFORM\n";
55
56my $config_sh = "config.sh";
57my $config_h = "config.h";
58my $thrdvar_h = "thrdvar.h";
59my $intrpvar_h = "intrpvar.h";
60my $perlvars_h = "perlvars.h";
61my $global_sym = "global.sym";
62my $pp_sym = "pp.sym";
63my $globvar_sym = "globvar.sym";
64my $perlio_sym = "perlio.sym";
65
66if ($PLATFORM eq 'aix') {
67 # Nothing for now.
7766f137
GS
68}
69elsif ($PLATFORM eq 'win32') {
549a6b10
JH
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
76unless ($PLATFORM eq 'win32') {
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
IZ
83 if ($PLATFORM eq 'os2') {
84 $CONFIG_ARGS = $1 if /^(?:config_args)='(.+)'$/;
85 $ARCHNAME = $1 if /^(?:archname)='(.+)'$/;
86 }
549a6b10
JH
87 }
88 close(CFG);
89}
90
91open(CFG,$config_h) || die "Cannot open $config_h: $!\n";
7766f137
GS
92while (<CFG>) {
93 $define{$1} = 1 if /^\s*#\s*define\s+(MYMALLOC)\b/;
bbda9c9d
GS
94 $define{$1} = 1 if /^\s*#\s*define\s+(USE_5005THREADS)\b/;
95 $define{$1} = 1 if /^\s*#\s*define\s+(USE_ITHREADS)\b/;
7766f137
GS
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}
bbc8f9de
NIS
100close(CFG);
101
549a6b10
JH
102if ($PLATFORM eq 'win32') {
103 warn join(' ',keys %define)."\n";
104 if ($define{PERL_OBJECT}) {
3075ddba 105 print "LIBRARY Perl56\n";
549a6b10
JH
106 print "DESCRIPTION 'Perl interpreter'\n";
107 print "EXPORTS\n";
51371543 108# output_symbol("perl_alloc");
549a6b10 109 output_symbol("perl_get_host_info");
7766f137 110 output_symbol("perl_alloc_override");
51371543
GS
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");
51371543 117# exit(0);
51371543
GS
118 }
119 else {
5db10396
GS
120 print "LIBRARY Perl\n";
121 print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
549a6b10
JH
122 print "EXPORTS\n";
123 }
7766f137
GS
124}
125elsif ($PLATFORM eq 'os2') {
3cfae81b
IZ
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---";
139LIBRARY '$dll' INITINSTANCE TERMINSTANCE
140DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'
141STACKSIZE 32768
142CODE LOADONCALL
143DATA LOADONCALL NONSHARED MULTIPLE
144EXPORTS
145---EOP---
7766f137
GS
146}
147elsif ($PLATFORM eq 'aix') {
549a6b10 148 print "#!\n";
ac4c12e7 149}
bbc8f9de 150
22239a37
NIS
151my %skip;
152my %export;
153
51371543
GS
154sub skip_symbols {
155 my $list = shift;
156 foreach my $symbol (@$list) {
157 $skip{$symbol} = 1;
158 }
22239a37
NIS
159}
160
51371543
GS
161sub emit_symbols {
162 my $list = shift;
163 foreach my $symbol (@$list) {
164 my $skipsym = $symbol;
165 # XXX hack
166 if ($define{PERL_OBJECT}) {
167 $skipsym =~ s/^Perl_[GIT](\w+)_ptr$/PL_$1/;
168 }
169 emit_symbol($symbol) unless exists $skip{$skipsym};
170 }
22239a37
NIS
171}
172
549a6b10 173if ($PLATFORM eq 'win32') {
7766f137
GS
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}
223elsif ($PLATFORM eq 'aix') {
549a6b10 224 skip_symbols([qw(
7766f137
GS
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}
248elsif ($PLATFORM eq 'os2') {
3cfae81b 249 emit_symbols([qw(
7766f137
GS
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 )]);
3cfae81b
IZ
289}
290
7766f137
GS
291unless ($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
307if ($define{'PERL_IMPLICIT_SYS'}) {
308 skip_symbols [qw(
309 Perl_getenv_len
310 Perl_my_popen
311 Perl_my_pclose
312 )];
313}
314else {
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
328if ($define{'MYMALLOC'}) {
329 emit_symbols [qw(
330 Perl_dump_mstats
331 Perl_malloc
332 Perl_mfree
333 Perl_realloc
334 Perl_calloc
335 )];
bbda9c9d 336 if ($define{'USE_5005THREADS'} || $define{'USE_ITHREADS'}) {
1feb2720
GS
337 emit_symbols [qw(
338 PL_malloc_mutex
339 )];
340 }
51371543
GS
341}
342else {
7766f137
GS
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
bbda9c9d 354unless ($define{'USE_5005THREADS'}) {
7766f137
GS
355 skip_symbols [qw(
356 PL_thr_key
357 PL_sv_mutex
358 PL_strtab_mutex
359 PL_svref_mutex
7766f137
GS
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
383unless ($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
407unless ($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
424unless ($define{'PERL_IMPLICIT_SYS'}) {
425 skip_symbols [qw(
426 perl_alloc_using
014822e4 427 perl_clone_using
7766f137
GS
428 )];
429}
430
431unless ($define{'FAKE_THREADS'}) {
432 skip_symbols [qw(PL_curthr)];
433}
434
435sub 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
bbda9c9d 449if ($define{'USE_5005THREADS'} || $define{'MULTIPLICITY'}) {
7766f137
GS
450 my $thrd = readvar($thrdvar_h);
451 skip_symbols $thrd;
452}
453
454if ($define{'MULTIPLICITY'}) {
455 my $interp = readvar($intrpvar_h);
456 skip_symbols $interp;
457}
458
459if ($define{'PERL_GLOBAL_STRUCT'}) {
460 my $global = readvar($perlvars_h);
461 skip_symbols $global;
462 emit_symbol('Perl_GetVars');
463 emit_symbols [qw(PL_Vars PL_VarsPtr)] unless $CCTYPE eq 'GCC';
464}
36c15d3f 465
22c35a8c
GS
466# functions from *.sym files
467
549a6b10
JH
468my @syms = ($global_sym, $pp_sym, $globvar_sym);
469
7766f137 470if ($define{'USE_PERLIO'}) {
549a6b10 471 push @syms, $perlio_sym;
7766f137
GS
472}
473
474for my $syms (@syms) {
475 open (GLOBAL, "<$syms") || die "failed to open $syms: $!\n";
476 while (<GLOBAL>) {
477 next if (!/^[A-Za-z]/);
478 # Functions have a Perl_ prefix
479 # Variables have a PL_ prefix
480 chomp($_);
481 my $symbol = ($syms =~ /var\.sym$/i ? "PL_" : "");
482 $symbol .= $_;
483 emit_symbol($symbol) unless exists $skip{$symbol};
484 }
485 close(GLOBAL);
486}
0a753a76 487
22c35a8c 488# variables
0a753a76 489
51371543 490if ($define{'PERL_OBJECT'}) {
43cd9f80 491 for my $f ($perlvars_h, $intrpvar_h, $thrdvar_h) {
51371543
GS
492 my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
493 emit_symbols $glob;
494 }
495}
496else {
497 unless ($define{'PERL_GLOBAL_STRUCT'}) {
549a6b10 498 my $glob = readvar($perlvars_h);
51371543
GS
499 emit_symbols $glob;
500 }
501 unless ($define{'MULTIPLICITY'}) {
549a6b10 502 my $glob = readvar($intrpvar_h);
51371543
GS
503 emit_symbols $glob;
504 }
bbda9c9d 505 unless ($define{'MULTIPLICITY'} || $define{'USE_5005THREADS'}) {
549a6b10 506 my $glob = readvar($thrdvar_h);
51371543
GS
507 emit_symbols $glob;
508 }
509}
0a753a76 510
549a6b10
JH
511sub try_symbol {
512 my $symbol = shift;
22239a37 513
549a6b10
JH
514 return if $symbol !~ /^[A-Za-z]/;
515 return if $symbol =~ /^\#/;
516 $symbol =~s/\r//g;
517 chomp($symbol);
43cd9f80 518 return if exists $skip{$symbol};
549a6b10 519 emit_symbol($symbol);
3e3baf6d 520}
0a753a76 521
549a6b10
JH
522while (<DATA>) {
523 try_symbol($_);
ac4c12e7
GS
524}
525
549a6b10
JH
526if ($PLATFORM eq 'win32') {
527 foreach my $symbol (qw(
7766f137
GS
528 boot_DynaLoader
529 Perl_getTHR
530 Perl_init_os_extras
531 Perl_setTHR
532 Perl_thread_create
533 Perl_win32_init
534 RunPerl
535 GetPerlInterpreter
536 SetPerlInterpreter
537 win32_errno
538 win32_environ
539 win32_stdin
540 win32_stdout
541 win32_stderr
542 win32_ferror
543 win32_feof
544 win32_strerror
545 win32_fprintf
546 win32_printf
547 win32_vfprintf
548 win32_vprintf
549 win32_fread
550 win32_fwrite
551 win32_fopen
552 win32_fdopen
553 win32_freopen
554 win32_fclose
555 win32_fputs
556 win32_fputc
557 win32_ungetc
558 win32_getc
559 win32_fileno
560 win32_clearerr
561 win32_fflush
562 win32_ftell
563 win32_fseek
564 win32_fgetpos
565 win32_fsetpos
566 win32_rewind
567 win32_tmpfile
568 win32_abort
569 win32_fstat
570 win32_stat
571 win32_pipe
572 win32_popen
573 win32_pclose
574 win32_rename
575 win32_setmode
576 win32_lseek
577 win32_tell
578 win32_dup
579 win32_dup2
580 win32_open
581 win32_close
582 win32_eof
583 win32_read
584 win32_write
585 win32_spawnvp
586 win32_mkdir
587 win32_rmdir
588 win32_chdir
589 win32_flock
590 win32_execv
591 win32_execvp
592 win32_htons
593 win32_ntohs
594 win32_htonl
595 win32_ntohl
596 win32_inet_addr
597 win32_inet_ntoa
598 win32_socket
599 win32_bind
600 win32_listen
601 win32_accept
602 win32_connect
603 win32_send
604 win32_sendto
605 win32_recv
606 win32_recvfrom
607 win32_shutdown
608 win32_closesocket
609 win32_ioctlsocket
610 win32_setsockopt
611 win32_getsockopt
612 win32_getpeername
613 win32_getsockname
614 win32_gethostname
615 win32_gethostbyname
616 win32_gethostbyaddr
617 win32_getprotobyname
618 win32_getprotobynumber
619 win32_getservbyname
620 win32_getservbyport
621 win32_select
622 win32_endhostent
623 win32_endnetent
624 win32_endprotoent
625 win32_endservent
626 win32_getnetent
627 win32_getnetbyname
628 win32_getnetbyaddr
629 win32_getprotoent
630 win32_getservent
631 win32_sethostent
632 win32_setnetent
633 win32_setprotoent
634 win32_setservent
635 win32_getenv
636 win32_putenv
637 win32_perror
638 win32_setbuf
639 win32_setvbuf
640 win32_flushall
641 win32_fcloseall
642 win32_fgets
643 win32_gets
644 win32_fgetc
645 win32_putc
646 win32_puts
647 win32_getchar
648 win32_putchar
649 win32_malloc
650 win32_calloc
651 win32_realloc
652 win32_free
653 win32_sleep
654 win32_times
655 win32_access
656 win32_alarm
657 win32_chmod
658 win32_open_osfhandle
659 win32_get_osfhandle
660 win32_ioctl
661 win32_link
662 win32_unlink
663 win32_utime
664 win32_uname
665 win32_wait
666 win32_waitpid
667 win32_kill
668 win32_str_os_error
669 win32_opendir
670 win32_readdir
671 win32_telldir
672 win32_seekdir
673 win32_rewinddir
674 win32_closedir
675 win32_longpath
676 win32_os_id
677 win32_getpid
678 win32_crypt
679 win32_dynaload
680 ))
681 {
549a6b10
JH
682 try_symbol($symbol);
683 }
684}
3cfae81b 685elsif ($PLATFORM eq 'os2') {
7766f137
GS
686 open MAP, 'miniperl.map' or die 'Cannot read miniperl.map';
687 /^\s*[\da-f:]+\s+(\w+)/i and $mapped{$1}++ foreach <MAP>;
688 close MAP or die 'Cannot close miniperl.map';
689
690 @missing = grep { !exists $mapped{$_} and !exists $bincompat5005{$_} }
691 keys %export;
692 delete $export{$_} foreach @missing;
3cfae81b 693}
22239a37 694
549a6b10
JH
695# Now all symbols should be defined because
696# next we are going to output them.
697
7766f137
GS
698foreach my $symbol (sort keys %export) {
699 output_symbol($symbol);
700}
549a6b10
JH
701
702sub emit_symbol {
7766f137
GS
703 my $symbol = shift;
704 chomp($symbol);
705 $export{$symbol} = 1;
549a6b10
JH
706}
707
708sub output_symbol {
709 my $symbol = shift;
4cb71bb6
GS
710 $symbol = $bincompat5005{$symbol}
711 if $define{PERL_BINCOMPAT_5005} and $symbol =~ /^($bincompat5005)$/;
549a6b10 712 if ($PLATFORM eq 'win32') {
549a6b10 713 $symbol = "_$symbol" if $CCTYPE eq 'BORLAND';
520c758a 714 print "\t$symbol\n";
549a6b10
JH
715# XXX: binary compatibility between compilers is an exercise
716# in frustration :-(
717# if ($CCTYPE eq "BORLAND") {
718# # workaround Borland quirk by exporting both the straight
719# # name and a name with leading underscore. Note the
720# # alias *must* come after the symbol itself, if both
721# # are to be exported. (Linker bug?)
722# print "\t_$symbol\n";
723# print "\t$symbol = _$symbol\n";
724# }
725# elsif ($CCTYPE eq 'GCC') {
726# # Symbols have leading _ whole process is $%@"% slow
727# # so skip aliases for now
728# nprint "\t$symbol\n";
729# }
730# else {
731# # for binary coexistence, export both the symbol and
732# # alias with leading underscore
733# print "\t$symbol\n";
734# print "\t_$symbol = $symbol\n";
735# }
7766f137
GS
736 }
737 elsif ($PLATFORM eq 'os2') {
3cfae81b 738 print qq( "$symbol"\n);
7766f137
GS
739 }
740 elsif ($PLATFORM eq 'aix') {
549a6b10
JH
741 print "$symbol\n";
742 }
743}
744
7451;
746__DATA__
747# extra globals not included above.
748perl_alloc
7766f137 749perl_alloc_using
014822e4
GS
750perl_clone
751perl_clone_using
549a6b10
JH
752perl_construct
753perl_destruct
754perl_free
755perl_parse
756perl_run