diff options
-rw-r--r-- | embed.h | 6 | ||||
-rwxr-xr-x | embed.pl | 12 | ||||
-rw-r--r-- | ext/Devel/DProf/DProf.xs | 2 | ||||
-rw-r--r-- | globals.c | 2 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Unix.pm | 20 | ||||
-rw-r--r-- | objXSUB.h | 2 | ||||
-rw-r--r-- | perlapi.c | 4 | ||||
-rw-r--r-- | proto.h | 2 |
8 files changed, 40 insertions, 10 deletions
@@ -56,6 +56,8 @@ #define malloced_size Perl_malloced_size #endif #if defined(PERL_OBJECT) +#ifndef __BORLANDC__ +#endif #endif #if defined(PERL_OBJECT) #else @@ -1489,6 +1491,8 @@ #define malloced_size Perl_malloced_size #endif #if defined(PERL_OBJECT) +#ifndef __BORLANDC__ +#endif #endif #if defined(PERL_OBJECT) #else @@ -2899,6 +2903,8 @@ #define malloced_size Perl_malloced_size #endif #if defined(PERL_OBJECT) +#ifndef __BORLANDC__ +#endif #endif #if defined(PERL_OBJECT) #else @@ -324,7 +324,7 @@ walk_table { my $ret = ""; if (@_ == 1) { my $arg = shift; - $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/; + $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/; } else { my ($flags,$retval,$func,@args) = @_; @@ -357,7 +357,7 @@ walk_table { my $ret = ""; if (@_ == 1) { my $arg = shift; - $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/; + $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/; } else { my ($flags,$retval,$func,@args) = @_; @@ -417,7 +417,7 @@ walk_table { my $ret = ""; if (@_ == 1) { my $arg = shift; - $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/; + $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/; } else { my ($flags,$retval,$func,@args) = @_; @@ -732,7 +732,7 @@ walk_table { my $ret = ""; if (@_ == 1) { my $arg = shift; - $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/; + $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/; } else { my ($flags,$retval,$func,@args) = @_; @@ -943,7 +943,7 @@ walk_table { my $ret = ""; if (@_ == 1) { my $arg = shift; - $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/; + $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/; } else { my ($flags,$retval,$func,@args) = @_; @@ -1068,7 +1068,9 @@ public: CPerlObj(IPerlMem*, IPerlMem*, IPerlMem*, IPerlEnv*, IPerlStdIO*, IPerlLIO*, IPerlDir*, IPerlSock*, IPerlProc*); void* operator new(size_t nSize, IPerlMem *pvtbl); +#ifndef __BORLANDC__ static void operator delete(void* pPerl, IPerlMem *pvtbl); +#endif int do_aspawn (void *vreally, void **vmark, void **vsp); #endif #if defined(PERL_OBJECT) diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs index d0ac18a7da..6e9cfb3075 100644 --- a/ext/Devel/DProf/DProf.xs +++ b/ext/Devel/DProf/DProf.xs @@ -96,7 +96,9 @@ typedef struct { long long start_cnt; #endif #ifdef PERL_IMPLICIT_CONTEXT +# define register pTHX; +# undef register #endif } prof_state_t; @@ -45,12 +45,14 @@ CPerlObj::operator new(size_t nSize, IPerlMem *pvtbl) #endif } +#ifndef __BORLANDC__ void CPerlObj::operator delete(void *pPerl, IPerlMem *pvtbl) { if(pvtbl) pvtbl->pFree(pvtbl, pPerl); } +#endif #ifdef WIN32 /* XXX why are these needed? */ bool diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 4a07185ef5..8940bf1ef9 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -377,10 +377,22 @@ sub cflags { if ($Is_PERL_OBJECT) { $self->{CCFLAGS} =~ s/-DPERL_OBJECT(\b|$)/-DPERL_CAPI/g; - if ($Is_Win32 && $Config{'cc'} =~ /^cl/i) { - # Turn off C++ mode of the MSC compiler - $self->{CCFLAGS} =~ s/-TP(\s|$)//; - $self->{OPTIMIZE} =~ s/-TP(\s|$)//; + if ($Is_Win32) { + if ($Config{'cc'} =~ /^cl/i) { + # Turn off C++ mode of the MSC compiler + $self->{CCFLAGS} =~ s/-TP(\s|$)//g; + $self->{OPTIMIZE} =~ s/-TP(\s|$)//g; + } + elsif ($Config{'cc'} =~ /^bcc32/i) { + # Turn off C++ mode of the Borland compiler + $self->{CCFLAGS} =~ s/-P(\s|$)//g; + $self->{OPTIMIZE} =~ s/-P(\s|$)//g; + } + elsif ($Config{'cc'} =~ /^gcc/i) { + # Turn off C++ mode of the GCC compiler + $self->{CCFLAGS} =~ s/-xc\+\+(\s|$)//g; + $self->{OPTIMIZE} =~ s/-xc\+\+(\s|$)//g; + } } } @@ -825,6 +825,8 @@ #if defined(MYMALLOC) #endif #if defined(PERL_OBJECT) +#ifndef __BORLANDC__ +#endif #endif #if defined(PERL_OBJECT) #else @@ -49,6 +49,8 @@ START_EXTERN_C #if defined(MYMALLOC) #endif #if defined(PERL_OBJECT) +#ifndef __BORLANDC__ +#endif #endif #if defined(PERL_OBJECT) #else @@ -5109,7 +5111,7 @@ Perl_ptr_table_split(pTHXo_ PTR_TBL_t *tbl) #if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT) # if defined(CRIPPLED_CC) # endif -# if defined(WIN32) +# if defined(PERL_CR_FILTER) # endif #endif #if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT) @@ -43,7 +43,9 @@ public: CPerlObj(IPerlMem*, IPerlMem*, IPerlMem*, IPerlEnv*, IPerlStdIO*, IPerlLIO*, IPerlDir*, IPerlSock*, IPerlProc*); void* operator new(size_t nSize, IPerlMem *pvtbl); +#ifndef __BORLANDC__ static void operator delete(void* pPerl, IPerlMem *pvtbl); +#endif int do_aspawn (void *vreally, void **vmark, void **vsp); #endif #if defined(PERL_OBJECT) |