summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure78
-rw-r--r--Cross/config.sh-arm-linux1
-rw-r--r--Cross/config.sh-arm-linux-n7701
-rw-r--r--NetWare/config.wc1
-rw-r--r--NetWare/config_H.wc8
-rw-r--r--Porting/Glossary5
-rw-r--r--Porting/config.sh1
-rw-r--r--Porting/config_H8
-rwxr-xr-xconfig_h.SH8
-rw-r--r--configure.com1
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--perl.h6
-rw-r--r--plan9/config.plan98
-rw-r--r--plan9/config_h.sample8
-rw-r--r--plan9/config_sh.sample1
-rw-r--r--proto.h2
-rw-r--r--symbian/config.sh1
-rw-r--r--uconfig.h12
-rw-r--r--uconfig.sh1
-rw-r--r--uconfig64.sh1
-rw-r--r--util.c2
-rw-r--r--win32/config.ce1
-rw-r--r--win32/config.gc1
-rw-r--r--win32/config.vc1
-rw-r--r--win32/config_H.ce8
-rw-r--r--win32/config_H.gc8
-rw-r--r--win32/config_H.vc8
28 files changed, 7 insertions, 178 deletions
diff --git a/Configure b/Configure
index 0c50aec492..6739e8babb 100755
--- a/Configure
+++ b/Configure
@@ -747,7 +747,6 @@ d_rint=''
d_rmdir=''
d_round=''
d_safebcpy=''
-d_safemcpy=''
d_sanemcmp=''
d_sbrkproto=''
d_scalbn=''
@@ -17990,82 +17989,6 @@ esac
set d_safebcpy
eval $setvar
-: can memcpy handle overlapping blocks?
-echo " "
-val="$undef"
-case "$d_memmove" in
-"$define") echo "I'll use memmove() instead of memcpy() for overlapping copies." ;;
-*) case "$d_memcpy" in
- "$define")
- echo "Checking to see if memcpy() can do overlapping copies..." >&4
- $cat >try.c <<EOCP
-#$i_memory I_MEMORY
-#$i_stdlib I_STDLIB
-#$i_string I_STRING
-#$i_unistd I_UNISTD
-EOCP
- $cat >>try.c <<'EOCP'
-#include <stdio.h>
-#ifdef I_MEMORY
-# include <memory.h>
-#endif
-#ifdef I_STDLIB
-# include <stdlib.h>
-#endif
-#ifdef I_STRING
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#ifdef I_UNISTD
-# include <unistd.h> /* Needed for NetBSD */
-#endif
-int main()
-{
-char buf[128], abc[128];
-char *b;
-int len;
-int off;
-int align;
-
-/* Copy "abcde..." string to char abc[] so that gcc doesn't
- try to store the string in read-only memory. */
-memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
-
-for (align = 7; align >= 0; align--) {
- for (len = 36; len; len--) {
- b = buf+align;
- memcpy(b, abc, len);
- for (off = 1; off <= len; off++) {
- memcpy(b+off, b, len);
- memcpy(b, b+off, len);
- if (memcmp(b, abc, len))
- exit(1);
- }
- }
-}
-exit(0);
-}
-EOCP
- set try
- if eval $compile_ok; then
- if $run ./try 2>/dev/null; then
- echo "Yes, it can."
- val="$define"
- else
- echo "It can't, sorry."
- fi
- else
- echo "(I can't compile the test program, so we'll assume not...)"
- fi
- ;;
- esac
- $rm_try
- ;;
-esac
-set d_safemcpy
-eval $setvar
-
: can memcmp be trusted to compare relative magnitude?
val="$undef"
case "$d_memcmp" in
@@ -25033,7 +24956,6 @@ d_rint='$d_rint'
d_rmdir='$d_rmdir'
d_round='$d_round'
d_safebcpy='$d_safebcpy'
-d_safemcpy='$d_safemcpy'
d_sanemcmp='$d_sanemcmp'
d_sbrkproto='$d_sbrkproto'
d_scalbn='$d_scalbn'
diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux
index e3e3f81141..76ceb0f86c 100644
--- a/Cross/config.sh-arm-linux
+++ b/Cross/config.sh-arm-linux
@@ -473,7 +473,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='define'
d_scalbn='undef'
diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770
index c22c7f19d1..2c6ce0bc31 100644
--- a/Cross/config.sh-arm-linux-n770
+++ b/Cross/config.sh-arm-linux-n770
@@ -367,7 +367,6 @@ d_rename='define'
d_rewinddir='define'
d_rmdir='define'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='define'
d_scalbnl='define'
diff --git a/NetWare/config.wc b/NetWare/config.wc
index 714e4157ba..be38eee5b2 100644
--- a/NetWare/config.wc
+++ b/NetWare/config.wc
@@ -462,7 +462,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc
index 1317f63861..391f468fd5 100644
--- a/NetWare/config_H.wc
+++ b/NetWare/config_H.wc
@@ -1810,14 +1810,6 @@
*/
/*#define HAS_SAFE_BCOPY /**/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_MEMCPY /**/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/Porting/Glossary b/Porting/Glossary
index 07fb8a9353..bf515d2066 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -2171,11 +2171,6 @@ d_safebcpy (d_safebcpy.U):
the bcopy() routine can do overlapping copies. Normally, you
should probably use memmove().
-d_safemcpy (d_safemcpy.U):
- This variable conditionally defines the HAS_SAFE_MEMCPY symbol if
- the memcpy() routine can do overlapping copies.
- For overlapping copies, memmove() should be used, if available.
-
d_sanemcmp (d_sanemcmp.U):
This variable conditionally defines the HAS_SANE_MEMCMP symbol if
the memcpy() routine is available and can be used to compare relative
diff --git a/Porting/config.sh b/Porting/config.sh
index 57adaddecf..d1eeba20c9 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -485,7 +485,6 @@ d_rint='define'
d_rmdir='define'
d_round='define'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='define'
d_scalbn='define'
diff --git a/Porting/config_H b/Porting/config_H
index 876a58e46e..59ff5624b4 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -1653,14 +1653,6 @@
*/
/*#define HAS_SAFE_BCOPY / **/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/config_h.SH b/config_h.SH
index 8c86772c24..64392eb71b 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -1119,14 +1119,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_safebcpy HAS_SAFE_BCOPY /**/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-#$d_safemcpy HAS_SAFE_MEMCPY /**/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/configure.com b/configure.com
index c540a7a8df..23d9951ac5 100644
--- a/configure.com
+++ b/configure.com
@@ -6311,7 +6311,6 @@ $ WC "d_rint='" + d_rint + "'"
$ WC "d_rmdir='define'"
$ WC "d_round='undef'"
$ WC "d_safebcpy='undef'"
-$ WC "d_safemcpy='define'"
$ WC "d_sanemcmp='define'"
$ WC "d_sbrkproto='define'"
$ WC "d_scalbn='undef'"
diff --git a/embed.fnc b/embed.fnc
index 279f1cb6f2..4144242c44 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1055,7 +1055,7 @@ s |void |move_proto_attr|NN OP **proto|NN OP **attrs \
p |int |mode_from_discipline|NULLOK const char* s|STRLEN len
Ap |const char* |moreswitches |NN const char* s
Ap |NV |my_atof |NN const char *s
-#if !defined(HAS_MEMCPY) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY))
+#if !defined(HAS_MEMCPY) || !defined(HAS_MEMMOVE)
Anp |void* |my_bcopy |NN const void* vfrom|NN void* vto|size_t len
#endif
Apr |void |my_exit |U32 status
diff --git a/embed.h b/embed.h
index 5273668a71..121b142af2 100644
--- a/embed.h
+++ b/embed.h
@@ -782,7 +782,7 @@
#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
#define my_memcmp Perl_my_memcmp
#endif
-#if !defined(HAS_MEMCPY) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY))
+#if !defined(HAS_MEMCPY) || !defined(HAS_MEMMOVE)
#define my_bcopy Perl_my_bcopy
#endif
#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
diff --git a/perl.h b/perl.h
index 40a60949f2..2cdcf1ff84 100644
--- a/perl.h
+++ b/perl.h
@@ -1014,11 +1014,7 @@ EXTERN_C int usleep(unsigned int);
#endif /* HAS_MEMCPY */
#if !defined(HAS_MEMMOVE) && !defined(memmove)
-# if defined(HAS_MEMCPY) && defined(HAS_SAFE_MEMCPY)
-# define memmove(d,s,l) memcpy(d,s,l)
-# else
-# define memmove(d,s,l) my_bcopy(s,d,l)
-# endif
+# define memmove(d,s,l) my_bcopy(s,d,l)
#endif
#if defined(mips) && defined(ultrix) && !defined(__STDC__)
diff --git a/plan9/config.plan9 b/plan9/config.plan9
index ec471db45d..81854e8304 100644
--- a/plan9/config.plan9
+++ b/plan9/config.plan9
@@ -2143,14 +2143,6 @@
*/
/*#define HAS_SAFE_BCOPY / **/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/plan9/config_h.sample b/plan9/config_h.sample
index 5baf0540b2..98811d493d 100644
--- a/plan9/config_h.sample
+++ b/plan9/config_h.sample
@@ -2096,14 +2096,6 @@
*/
/*#define HAS_SAFE_BCOPY / **/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample
index ecf02feedb..fabf84c456 100644
--- a/plan9/config_sh.sample
+++ b/plan9/config_sh.sample
@@ -473,7 +473,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/proto.h b/proto.h
index b004723069..f0bfef1337 100644
--- a/proto.h
+++ b/proto.h
@@ -3835,7 +3835,7 @@ PERL_CALLCONV int Perl_my_memcmp(const void* vs1, const void* vs2, size_t len)
assert(vs1); assert(vs2)
#endif
-#if !defined(HAS_MEMCPY) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY))
+#if !defined(HAS_MEMCPY) || !defined(HAS_MEMMOVE)
PERL_CALLCONV void* Perl_my_bcopy(const void* vfrom, void* vto, size_t len);
#define PERL_ARGS_ASSERT_MY_BCOPY \
assert(vfrom); assert(vto)
diff --git a/symbian/config.sh b/symbian/config.sh
index f798c1a36a..e50a021700 100644
--- a/symbian/config.sh
+++ b/symbian/config.sh
@@ -419,7 +419,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='undef'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/uconfig.h b/uconfig.h
index d4341e4116..6684710734 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -1084,14 +1084,6 @@
*/
/*#define HAS_SAFE_BCOPY / **/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
@@ -5427,6 +5419,6 @@
#endif
/* Generated from:
- * 7ff89cdb1fe8ce0204ce7e895ef3799d115d4e499f4b93f639ab96b64a63d57e config_h.SH
- * bd4d12ab7495a044625abc3e1128f6939bdb50a02a59ae3a1b8bf64433002191 uconfig.sh
+ * d9687e4eb62ebccd02be4a08612dc1bcfd95119f0008203aee08f29c997ebfc3 config_h.SH
+ * 4fb77492d82d8e37400b5d34c71f1c2489d5dc04e82e61ec78998af0fdd60d99 uconfig.sh
* ex: set ro: */
diff --git a/uconfig.sh b/uconfig.sh
index ae319aa7c3..04e65eca87 100644
--- a/uconfig.sh
+++ b/uconfig.sh
@@ -412,7 +412,6 @@ d_rint='undef'
d_rmdir='undef'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='undef'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/uconfig64.sh b/uconfig64.sh
index e044c81e04..fb9c556e46 100644
--- a/uconfig64.sh
+++ b/uconfig64.sh
@@ -413,7 +413,6 @@ d_rint='undef'
d_rmdir='undef'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='undef'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/util.c b/util.c
index d2659b4fbc..53fcf17372 100644
--- a/util.c
+++ b/util.c
@@ -2225,7 +2225,7 @@ Perl_unlnk(pTHX_ const char *f) /* unlink all versions of a file */
/* this is a drop-in replacement for bcopy(), except for the return
* value, which we need to be able to emulate memcpy() */
-#if !defined(HAS_MEMCPY) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY))
+#if !defined(HAS_MEMCPY) || !defined(HAS_MEMMOVE)
void *
Perl_my_bcopy(const void *vfrom, void *vto, size_t len)
{
diff --git a/win32/config.ce b/win32/config.ce
index 6b26210619..3db982444d 100644
--- a/win32/config.ce
+++ b/win32/config.ce
@@ -460,7 +460,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/win32/config.gc b/win32/config.gc
index 8863d11943..58882d93d0 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -461,7 +461,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/win32/config.vc b/win32/config.vc
index e73cfbe66d..dde3954981 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -461,7 +461,6 @@ d_rint='undef'
d_rmdir='define'
d_round='undef'
d_safebcpy='undef'
-d_safemcpy='undef'
d_sanemcmp='define'
d_sbrkproto='undef'
d_scalbn='undef'
diff --git a/win32/config_H.ce b/win32/config_H.ce
index 9ee004ca99..9aada6e3a2 100644
--- a/win32/config_H.ce
+++ b/win32/config_H.ce
@@ -2098,14 +2098,6 @@
*/
/*#define HAS_SAFE_BCOPY /**/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY /**/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 08b719c338..3de8267094 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -1072,14 +1072,6 @@
*/
/*#define HAS_SAFE_BCOPY / **/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high
diff --git a/win32/config_H.vc b/win32/config_H.vc
index a8f1f11063..c3e17a20cf 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -1072,14 +1072,6 @@
*/
/*#define HAS_SAFE_BCOPY / **/
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. If you need to
- * copy overlapping memory blocks, you should check HAS_MEMMOVE and
- * use memmove() instead, if available.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
/* HAS_SANE_MEMCMP:
* This symbol, if defined, indicates that the memcmp routine is available
* and can be used to compare relative magnitudes of chars with their high