my $CCTYPE;
my %bincompat5005 =
- (Perl_call_argv => "perl_call_argv",
+ (
+ Perl_call_atexit => "perl_atexit",
+ Perl_eval_sv => "perl_eval_sv",
+ Perl_eval_pv => "perl_eval_pv",
+ Perl_call_argv => "perl_call_argv",
Perl_call_method => "perl_call_method",
Perl_call_pv => "perl_call_pv",
Perl_call_sv => "perl_call_sv",
Perl_malloc => "malloc",
Perl_mfree => "free",
Perl_realloc => "realloc",
- Perl_calloc => "calloc",);
+ Perl_calloc => "calloc",
+ );
my $bincompat5005 = join("|", keys %bincompat5005);
}
elsif ($PLATFORM eq 'win32') {
$CCTYPE = "MSVC" unless defined $CCTYPE;
- foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym, $pp_sym, $globvar_sym) {
+ foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
+ $pp_sym, $globvar_sym, $perlio_sym) {
s!^!..\\!;
}
}
$define{$1} = 1 if /^\s*#\s*define\s+(USE_ITHREADS)\b/;
$define{$1} = 1 if /^\s*#\s*define\s+(USE_PERLIO)\b/;
$define{$1} = 1 if /^\s*#\s*define\s+(MULTIPLICITY)\b/;
+ $define{$1} = 1 if /^\s*#\s*define\s+(PERL_IMPLICIT_SYS)\b/;
$define{$1} = 1 if /^\s*#\s*define\s+(PERL_BINCOMPAT_5005)\b/;
}
close(CFG);
+# perl.h logic duplication begins
+
+if ($define{USE_ITHREADS}) {
+ if (!$define{MULTIPLICITY} && !$define{PERL_OBJECT}) {
+ $define{MULTIPLICITY} = 1;
+ }
+}
+
+$define{PERL_IMPLICIT_CONTEXT} ||=
+ $define{USE_ITHREADS} ||
+ $define{USE_5005THREADS} ||
+ $define{MULTIPLICITY} ;
+
+if ($define{PERL_CAPI}) {
+ delete $define{PERL_OBJECT};
+ $define{MULTIPLICITY} = 1;
+ $define{PERL_IMPLICIT_CONTEXT} = 1;
+ $define{PERL_IMPLICIT_SYS} = 1;
+}
+
+if ($define{PERL_OBJECT}) {
+ $define{PERL_IMPLICIT_CONTEXT} = 1;
+ $define{PERL_IMPLICIT_SYS} = 1;
+}
+
+# perl.h logic duplication ends
+
if ($PLATFORM eq 'win32') {
warn join(' ',keys %define)."\n";
- if ($define{PERL_OBJECT} || $define{MULTIPLICITY}) {
- print "LIBRARY Perl56\n";
- print "DESCRIPTION 'Perl interpreter'\n";
- print "EXPORTS\n";
+ print "LIBRARY Perl56\n";
+ print "DESCRIPTION 'Perl interpreter'\n";
+ print "EXPORTS\n";
+ if ($define{PERL_IMPLICIT_SYS}) {
output_symbol("perl_get_host_info");
output_symbol("perl_alloc_override");
}
- else {
- print "LIBRARY Perl56\n";
- print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
- print "EXPORTS\n";
- }
}
elsif ($PLATFORM eq 'os2') {
($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/;
# print STDERR "'$dll' <= '$define{PERL_DLL}'\n";
print <<"---EOP---";
LIBRARY '$dll' INITINSTANCE TERMINSTANCE
-DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'
+DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter'
STACKSIZE 32768
CODE LOADONCALL
DATA LOADONCALL NONSHARED MULTIPLE
Perl_safexrealloc
Perl_same_dirent
Perl_unlnk
+ Perl_sys_intern_clear
+ Perl_sys_intern_dup
+ Perl_sys_intern_init
PL_cryptseen
PL_opsave
PL_statusvalue_vms
dlopen
dlsym
dlerror
+ dlclose
my_tmpfile
my_tmpnam
my_flock
)];
}
+unless ($define{'PERL_FLEXIBLE_EXCEPTIONS'}) {
+ skip_symbols [qw(
+ PL_protect
+ Perl_default_protect
+ Perl_vdefault_protect
+ )];
+}
+
if ($define{'MYMALLOC'}) {
emit_symbols [qw(
Perl_dump_mstats
+ Perl_get_mstats
Perl_malloc
Perl_mfree
Perl_realloc
PL_malloc_mutex
)];
}
+ else {
+ skip_symbols [qw(
+ PL_malloc_mutex
+ )];
+ }
}
else {
skip_symbols [qw(
PL_malloc_mutex
Perl_dump_mstats
+ Perl_get_mstats
Perl_malloc
Perl_mfree
Perl_realloc
)];
}
-unless ($define{'USE_5005THREADS'}) {
+unless ($define{'USE_5005THREADS'} || $define{'USE_ITHREADS'}) {
skip_symbols [qw(
PL_thr_key
+ )];
+}
+
+unless ($define{'USE_5005THREADS'}) {
+ skip_symbols [qw(
PL_sv_mutex
PL_strtab_mutex
PL_svref_mutex
PL_cred_mutex
PL_eval_mutex
+ PL_fdpid_mutex
+ PL_sv_lock_mutex
PL_eval_cond
PL_eval_owner
PL_threads_mutex
PL_threadsv_names
PL_thrsv
PL_vtbl_mutex
- Perl_getTHR
- Perl_setTHR
Perl_condpair_magic
Perl_new_struct_thread
Perl_per_thread_magicals
Perl_find_threadsv
Perl_unlock_condpair
Perl_magic_mutexfree
+ Perl_sv_lock
)];
}
unless ($define{'USE_ITHREADS'}) {
skip_symbols [qw(
PL_ptr_table
+ PL_op_mutex
Perl_dirp_dup
Perl_cx_dup
Perl_si_dup
Perl_die_nocontext
Perl_deb_nocontext
Perl_form_nocontext
+ Perl_load_module_nocontext
Perl_mess_nocontext
Perl_warn_nocontext
Perl_warner_nocontext
# functions from *.sym files
-my @syms = ($global_sym, $pp_sym, $globvar_sym);
+my @syms = ($global_sym, $globvar_sym); # $pp_sym is not part of the API
if ($define{'USE_PERLIO'}) {
push @syms, $perlio_sym;
my $glob = readvar($f, sub { "Perl_" . $_[1] . $_[2] . "_ptr" });
emit_symbols $glob;
}
+ # XXX AIX seems to want the perlvars.h symbols, for some reason
+ if ($PLATFORM eq 'aix') {
+ my $glob = readvar($perlvars_h);
+ emit_symbols $glob;
+ }
}
else {
unless ($define{'PERL_GLOBAL_STRUCT'}) {
if ($PLATFORM eq 'win32') {
foreach my $symbol (qw(
+ setuid
+ setgid
boot_DynaLoader
- Perl_getTHR
Perl_init_os_extras
- Perl_setTHR
Perl_thread_create
Perl_win32_init
RunPerl
- GetPerlInterpreter
- SetPerlInterpreter
win32_errno
win32_environ
- win32_stdin
- win32_stdout
- win32_stderr
- win32_ferror
- win32_feof
- win32_strerror
- win32_fprintf
- win32_printf
- win32_vfprintf
- win32_vprintf
- win32_fread
- win32_fwrite
- win32_fopen
- win32_fdopen
- win32_freopen
- win32_fclose
- win32_fputs
- win32_fputc
- win32_ungetc
- win32_getc
- win32_fileno
- win32_clearerr
- win32_fflush
- win32_ftell
- win32_fseek
- win32_fgetpos
- win32_fsetpos
- win32_rewind
- win32_tmpfile
win32_abort
win32_fstat
win32_stat
win32_getenv
win32_putenv
win32_perror
- win32_setbuf
- win32_setvbuf
- win32_flushall
- win32_fcloseall
- win32_fgets
- win32_gets
- win32_fgetc
- win32_putc
- win32_puts
- win32_getchar
- win32_putchar
win32_malloc
win32_calloc
win32_realloc
win32_getpid
win32_crypt
win32_dynaload
+
+ win32_stdin
+ win32_stdout
+ win32_stderr
+ win32_ferror
+ win32_feof
+ win32_strerror
+ win32_fprintf
+ win32_printf
+ win32_vfprintf
+ win32_vprintf
+ win32_fread
+ win32_fwrite
+ win32_fopen
+ win32_fdopen
+ win32_freopen
+ win32_fclose
+ win32_fputs
+ win32_fputc
+ win32_ungetc
+ win32_getc
+ win32_fileno
+ win32_clearerr
+ win32_fflush
+ win32_ftell
+ win32_fseek
+ win32_fgetpos
+ win32_fsetpos
+ win32_rewind
+ win32_tmpfile
+ win32_setbuf
+ win32_setvbuf
+ win32_flushall
+ win32_fcloseall
+ win32_fgets
+ win32_gets
+ win32_fgetc
+ win32_putc
+ win32_puts
+ win32_getchar
+ win32_putchar
))
{
try_symbol($symbol);