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