From: Andy Dougherty Date: Tue, 12 Jun 2001 17:11:52 +0000 (-0400) Subject: Small bcopy cleanup X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2253333fe456e42259ae7571ab31af43f7c33890;p=p5sagit%2Fp5-mst-13.2.git Small bcopy cleanup Message-ID: p4raw-id: //depot/perl@10542 --- diff --git a/embed.h b/embed.h index 2cbdd62..1191893 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 dab316e..c66e8f3 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 1e70169..76b2e73 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 64582f6..c0f1148 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 ed4ba6c..5bd0010 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 d9e9c65..945172e 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 cbcb80c..f4dcd26 100644 --- a/x2p/a2p.h +++ b/x2p/a2p.h @@ -86,19 +86,11 @@ # include #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 #endif