summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.h6
-rwxr-xr-xembed.pl2
-rw-r--r--objXSUB.h2
-rw-r--r--perlapi.c2
-rw-r--r--proto.h2
-rw-r--r--util.c2
-rw-r--r--x2p/a2p.h8
7 files changed, 8 insertions, 16 deletions
diff --git a/embed.h b/embed.h
index 2cbdd6226f..1191893fb4 100644
--- a/embed.h
+++ b/embed.h
@@ -420,7 +420,7 @@
#define moreswitches Perl_moreswitches
#define my Perl_my
#define my_atof Perl_my_atof
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
#define my_bcopy Perl_my_bcopy
#endif
#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
@@ -1925,7 +1925,7 @@
#define moreswitches(a) Perl_moreswitches(aTHX_ a)
#define my(a) Perl_my(aTHX_ a)
#define my_atof(a) Perl_my_atof(aTHX_ a)
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
#define my_bcopy Perl_my_bcopy
#endif
#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
@@ -3778,7 +3778,7 @@
#define my Perl_my
#define Perl_my_atof CPerlObj::Perl_my_atof
#define my_atof Perl_my_atof
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
#define Perl_my_bcopy CPerlObj::Perl_my_bcopy
#define my_bcopy Perl_my_bcopy
#endif
diff --git a/embed.pl b/embed.pl
index dab316e38b..c66e8f3776 100755
--- a/embed.pl
+++ b/embed.pl
@@ -1759,7 +1759,7 @@ p |int |mode_from_discipline|SV* discp
Ap |char* |moreswitches |char* s
p |OP* |my |OP* o
Ap |NV |my_atof |const char *s
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
Anp |char* |my_bcopy |const char* from|char* to|I32 len
#endif
#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
diff --git a/objXSUB.h b/objXSUB.h
index 1e70169fd0..76b2e73081 100644
--- a/objXSUB.h
+++ b/objXSUB.h
@@ -885,7 +885,7 @@
#define Perl_my_atof pPerl->Perl_my_atof
#undef my_atof
#define my_atof Perl_my_atof
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
#undef Perl_my_bcopy
#define Perl_my_bcopy pPerl->Perl_my_bcopy
#undef my_bcopy
diff --git a/perlapi.c b/perlapi.c
index 64582f6ba3..c0f11483d6 100644
--- a/perlapi.c
+++ b/perlapi.c
@@ -1636,7 +1636,7 @@ Perl_my_atof(pTHXo_ const char *s)
{
return ((CPerlObj*)pPerl)->Perl_my_atof(s);
}
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
#undef Perl_my_bcopy
char*
diff --git a/proto.h b/proto.h
index ed4ba6c7f9..5bd0010206 100644
--- a/proto.h
+++ b/proto.h
@@ -486,7 +486,7 @@ PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ SV* discp);
PERL_CALLCONV char* Perl_moreswitches(pTHX_ char* s);
PERL_CALLCONV OP* Perl_my(pTHX_ OP* o);
PERL_CALLCONV NV Perl_my_atof(pTHX_ const char *s);
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
PERL_CALLCONV char* Perl_my_bcopy(const char* from, char* to, I32 len);
#endif
#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
diff --git a/util.c b/util.c
index d9e9c659a6..945172e1da 100644
--- a/util.c
+++ b/util.c
@@ -2085,7 +2085,7 @@ Perl_unlnk(pTHX_ char *f) /* unlink all versions of a file */
#endif
/* this is a drop-in replacement for bcopy() */
-#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
+#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
char *
Perl_my_bcopy(register const char *from,register char *to,register I32 len)
{
diff --git a/x2p/a2p.h b/x2p/a2p.h
index cbcb80c0a6..f4dcd268ff 100644
--- a/x2p/a2p.h
+++ b/x2p/a2p.h
@@ -86,19 +86,11 @@
# include <strings.h>
#endif
-#if !defined(HAS_BCOPY) || defined(__cplusplus)
-# define bcopy(s1,s2,l) memcpy(s2,s1,l)
-#endif
-#if !defined(HAS_BZERO) || defined(__cplusplus)
-# define bzero(s,l) memset(s,0,l)
-#endif
-
#if !defined(HAS_STRCHR) && defined(HAS_INDEX) && !defined(strchr)
#define strchr index
#define strrchr rindex
#endif
-
#ifdef I_TIME
# include <time.h>
#endif