summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.h6
-rwxr-xr-xembed.pl12
-rw-r--r--ext/Devel/DProf/DProf.xs2
-rw-r--r--globals.c2
-rw-r--r--lib/ExtUtils/MM_Unix.pm20
-rw-r--r--objXSUB.h2
-rw-r--r--perlapi.c4
-rw-r--r--proto.h2
8 files changed, 40 insertions, 10 deletions
diff --git a/embed.h b/embed.h
index 95f3dd59a6..870e7e8a7f 100644
--- a/embed.h
+++ b/embed.h
@@ -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
diff --git a/embed.pl b/embed.pl
index f04de69986..db1ddf0972 100755
--- a/embed.pl
+++ b/embed.pl
@@ -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;
diff --git a/globals.c b/globals.c
index 80c659e86a..41dc924894 100644
--- a/globals.c
+++ b/globals.c
@@ -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;
+ }
}
}
diff --git a/objXSUB.h b/objXSUB.h
index 5c03183257..56895c52e3 100644
--- a/objXSUB.h
+++ b/objXSUB.h
@@ -825,6 +825,8 @@
#if defined(MYMALLOC)
#endif
#if defined(PERL_OBJECT)
+#ifndef __BORLANDC__
+#endif
#endif
#if defined(PERL_OBJECT)
#else
diff --git a/perlapi.c b/perlapi.c
index 49dfeb6ccc..d6c5d32422 100644
--- a/perlapi.c
+++ b/perlapi.c
@@ -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)
diff --git a/proto.h b/proto.h
index 06c834cdc1..2118be4b72 100644
--- a/proto.h
+++ b/proto.h
@@ -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)