X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/9c3c380d813ff0a7072f01b5e0109b7e21b8d0fd..93ea32b83e27783af976f1a5fb27ee02deebc40b:/makedef.pl diff --git a/makedef.pl b/makedef.pl index 6efbcdf..4e9dfb2 100644 --- a/makedef.pl +++ b/makedef.pl @@ -4,7 +4,7 @@ # # Needed by WIN32 and OS/2 for creating perl.dll, # and by AIX for creating libperl.a when -Dusershrplib is in effect, -# and by MacOS Classic. +# and by VMS for creating perlshr.exe. # # Reads from information stored in # @@ -13,7 +13,6 @@ # global.sym # globvar.sym # intrpvar.h -# macperl.sym (on MacOS) # miniperl.map (on OS/2) # perl5.def (on OS/2; this is the old version of the file being made) # perlio.sym @@ -31,7 +30,7 @@ # perldll.def Windows # perl.exp AIX # perl.imp NetWare - +# makedef.lis VMS BEGIN { unshift @INC, "lib" } use Config; @@ -59,7 +58,7 @@ while (@ARGV) { } } -my @PLATFORM = qw(aix win32 wince os2 MacOS netware); +my @PLATFORM = qw(aix win32 wince os2 netware vms); my %PLATFORM; @PLATFORM{@PLATFORM} = (); @@ -104,7 +103,6 @@ my $config_h = "config.h"; my $intrpvar_h = "intrpvar.h"; my $perlvars_h = "perlvars.h"; my $global_sym = "global.sym"; -my $pp_sym = "pp.sym"; my $globvar_sym = "globvar.sym"; my $perlio_sym = "perlio.sym"; my $static_ext = ""; @@ -114,19 +112,12 @@ if ($PLATFORM eq 'aix') { } elsif ($PLATFORM =~ /^win(?:32|ce)$/ || $PLATFORM eq 'netware') { $CCTYPE = "MSVC" unless defined $CCTYPE; - foreach ($intrpvar_h, $perlvars_h, $global_sym, - $pp_sym, $globvar_sym, $perlio_sym) { + foreach ($intrpvar_h, $perlvars_h, $global_sym, $globvar_sym, $perlio_sym) { s!^!..\\!; } } -elsif ($PLATFORM eq 'MacOS') { - foreach ($intrpvar_h, $perlvars_h, $global_sym, - $pp_sym, $globvar_sym, $perlio_sym) { - s!^!::!; - } -} -unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'MacOS' || $PLATFORM eq 'netware') { +unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'netware') { open(CFG,$config_sh) || die "Cannot open $config_sh: $!\n"; while () { if (/^(?:ccflags|optimize)='(.+)'$/) { @@ -141,6 +132,10 @@ unless ($PLATFORM eq 'win32' || $PLATFORM eq 'wince' || $PLATFORM eq 'MacOS' || $ARCHNAME = $1 if /^archname='(.+)'$/; $PATCHLEVEL = $1 if /^perl_patchlevel='(.+)'$/; } + if ($PLATFORM eq 'vms') { + $define{DEBUGGING} = 1 if /^usedebugging_perl='Y'$/; + $define{UNLINK_ALL_VERSIONS} = 1 if /^d_unlink_all_versions='define'$/; + } } close(CFG); } @@ -189,11 +184,11 @@ my $sym_ord = 0; print STDERR "Defines: (" . join(' ', sort keys %define) . ")\n"; if ($PLATFORM =~ /^win(?:32|ce)$/) { - (my $dll = ($define{PERL_DLL} || "perl512")) =~ s/\.dll$//i; + (my $dll = ($define{PERL_DLL} || "perl515")) =~ s/\.dll$//i; print "LIBRARY $dll\n"; # The DESCRIPTION module definition file statement is not supported # by VC7 onwards. - if ($CCTYPE !~ /^MSVC7/ && $CCTYPE !~ /^MSVC8/ && $CCTYPE !~ /^MSVC9/) { + if ($CCTYPE =~ /^(?:MSVC60|GCC|BORLAND)$/) { print "DESCRIPTION 'Perl interpreter'\n"; } print "EXPORTS\n"; @@ -245,7 +240,7 @@ elsif ($PLATFORM eq 'aix') { } elsif ($PLATFORM eq 'netware') { if ($FILETYPE eq 'def') { - print "LIBRARY perl512\n"; + print "LIBRARY perl515\n"; print "DESCRIPTION 'Perl interpreter for NetWare'\n"; print "EXPORTS\n"; } @@ -329,7 +324,7 @@ if ($PLATFORM eq 'win32') { Perl_my_sprintf )]; } -else { +elsif ($PLATFORM ne 'vms') { skip_symbols [qw( Perl_do_spawn Perl_do_spawn_nowait @@ -359,7 +354,6 @@ if ($PLATFORM eq 'wince') { PL_numeric_name PL_numeric_radix_sv PL_numeric_standard - PL_vtbl_collxfrm Perl_sv_collxfrm setgid setuid @@ -517,34 +511,6 @@ elsif ($PLATFORM eq 'os2') { )]) if $define{'USE_5005THREADS'} or $define{'USE_ITHREADS'}; } -elsif ($PLATFORM eq 'MacOS') { - skip_symbols [qw( - Perl_GetVars - PL_cryptseen - PL_cshlen - PL_cshname - PL_statusvalue_vms - PL_sys_intern - PL_opsave - PL_timesbuf - Perl_dump_fds - Perl_my_bcopy - Perl_my_bzero - Perl_my_chsize - Perl_my_htonl - Perl_my_memcmp - Perl_my_memset - Perl_my_ntohl - Perl_my_swap - Perl_safexcalloc - Perl_safexfree - Perl_safexmalloc - Perl_safexrealloc - Perl_unlnk - Perl_sys_intern_clear - Perl_sys_intern_init - )]; -} elsif ($PLATFORM eq 'netware') { skip_symbols [qw( PL_statusvalue_vms @@ -621,6 +587,116 @@ elsif ($PLATFORM eq 'netware') { PerlIO_perlio )]; } +elsif ($PLATFORM eq 'vms') { + emit_symbols([qw( + boot_DynaLoader + Perl_cando + Perl_cando_by_name + Perl_closedir + Perl_csighandler_init + Perl_do_rmdir + Perl_fileify_dirspec + Perl_fileify_dirspec_ts + Perl_fileify_dirspec_utf8 + Perl_fileify_dirspec_utf8_ts + Perl_flex_fstat + Perl_flex_lstat + Perl_flex_stat + Perl_kill_file + Perl_my_chdir + Perl_my_chmod + Perl_my_crypt + Perl_my_endpwent + Perl_my_fclose + Perl_my_fdopen + Perl_my_fgetname + Perl_my_flush + Perl_my_fwrite + Perl_my_gconvert + Perl_my_getenv + Perl_my_getenv_len + Perl_my_getlogin + Perl_my_getpwnam + Perl_my_getpwuid + Perl_my_gmtime + Perl_my_kill + Perl_my_localtime + Perl_my_mkdir + Perl_my_sigaction + Perl_my_symlink + Perl_my_time + Perl_my_tmpfile + Perl_my_trnlnm + Perl_my_utime + Perl_my_waitpid + Perl_opendir + Perl_pathify_dirspec + Perl_pathify_dirspec_ts + Perl_pathify_dirspec_utf8 + Perl_pathify_dirspec_utf8_ts + Perl_readdir + Perl_readdir_r + Perl_rename + Perl_rmscopy + Perl_rmsexpand + Perl_rmsexpand_ts + Perl_rmsexpand_utf8 + Perl_rmsexpand_utf8_ts + Perl_seekdir + Perl_sig_to_vmscondition + Perl_telldir + Perl_tounixpath + Perl_tounixpath_ts + Perl_tounixpath_utf8 + Perl_tounixpath_utf8_ts + Perl_tounixspec + Perl_tounixspec_ts + Perl_tounixspec_utf8 + Perl_tounixspec_utf8_ts + Perl_tovmspath + Perl_tovmspath_ts + Perl_tovmspath_utf8 + Perl_tovmspath_utf8_ts + Perl_tovmsspec + Perl_tovmsspec_ts + Perl_tovmsspec_utf8 + Perl_tovmsspec_utf8_ts + Perl_trim_unixpath + Perl_vms_case_tolerant + Perl_vms_do_aexec + Perl_vms_do_exec + Perl_vms_image_init + Perl_vms_realpath + Perl_vmssetenv + Perl_vmssetuserlnm + Perl_vmstrnenv + PerlIO_openn + )]); + skip_symbols([qw( + PL_statusvalue_posix + PL_cryptseen + PL_opsave + Perl_GetVars + Perl_dump_fds + Perl_my_bzero + Perl_my_bcopy + Perl_my_chsize + Perl_my_htonl + Perl_my_memcmp + Perl_my_memset + Perl_my_ntohl + Perl_my_sprintf + Perl_my_swap + )]); + skip_symbols([qw( + Perl_signbit + )]) + if $define{'HAS_SIGNBIT'}; + skip_symbols([qw( + Perl_unlnk + )]) + unless $define{'UNLINK_ALL_VERSIONS'}; +} unless ($define{'DEBUGGING'}) { skip_symbols [qw( @@ -761,6 +837,8 @@ unless ($define{'USE_ITHREADS'}) { PL_my_ctx_mutex PL_perlio_mutex PL_regdupe + Perl_clone_params_del + Perl_clone_params_new Perl_parser_dup Perl_dirp_dup Perl_cx_dup @@ -774,6 +852,7 @@ unless ($define{'USE_ITHREADS'}) { Perl_mro_meta_dup Perl_re_dup_guts Perl_sv_dup + Perl_sv_dup_inc Perl_rvpv_dup Perl_hek_dup Perl_sys_intern_dup @@ -937,7 +1016,7 @@ if ($define{'PERL_MAD'}) { unless ($define{'MULTIPLICITY'}) { skip_symbols [qw( PL_interp_size - PL_interp_size_5_10_0 + PL_interp_size_5_16_0 )]; } @@ -999,7 +1078,7 @@ if ($define{'PERL_GLOBAL_STRUCT'}) { # functions from *.sym files -my @syms = ($global_sym, $globvar_sym); # $pp_sym is not part of the API +my @syms = ($global_sym, $globvar_sym); # Symbols that are the public face of the PerlIO layers implementation # These are in _addition to_ the public face of the abstraction @@ -1218,15 +1297,11 @@ for my $syms (@syms) { # variables -if ($define{'MULTIPLICITY'}) { - for my $f ($perlvars_h, $intrpvar_h) { +if ($define{'MULTIPLICITY'} && $define{PERL_GLOBAL_STRUCT}) { + for my $f ($perlvars_h) { my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" }); emit_symbols $glob; } - unless ($define{'USE_ITHREADS'}) { - # XXX needed for XS extensions that define PERL_CORE - emit_symbol("PL_curinterp"); - } # XXX AIX seems to want the perlvars.h symbols, for some reason if ($PLATFORM eq 'aix' or $PLATFORM eq 'os2') { # OS/2 needs PL_thr_key my $glob = readvar($perlvars_h); @@ -1238,7 +1313,7 @@ else { my $glob = readvar($perlvars_h); emit_symbols $glob; } - unless ($define{'MULTIPLICITY'}) { + unless ($define{MULTIPLICITY}) { my $glob = readvar($intrpvar_h); emit_symbols $glob; } @@ -1441,15 +1516,6 @@ elsif ($PLATFORM eq 'os2') { @missing = grep { !exists $exportperlmalloc{$_} } @missing; delete $export{$_} foreach @missing; } -elsif ($PLATFORM eq 'MacOS') { - open MACSYMS, 'macperl.sym' or die 'Cannot read macperl.sym'; - - while () { - try_symbol($_); - } - - close MACSYMS; -} elsif ($PLATFORM eq 'netware') { foreach my $symbol (qw( boot_DynaLoader @@ -1663,7 +1729,7 @@ sub output_symbol { $ordinal{$exportperlmalloc{$symbol}} || ++$sym_ord if $exportperlmalloc and exists $exportperlmalloc{$symbol}; } - elsif ($PLATFORM eq 'aix' || $PLATFORM eq 'MacOS') { + elsif ($PLATFORM eq 'aix' || $PLATFORM eq 'vms') { print "$symbol\n"; } elsif ($PLATFORM eq 'netware') {