diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-12 13:47:22 +0200 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:51:21 +0100 |
commit | 1c1d7d5ba0bc33e7bea0a9aeb2d420fc5a8128ab (patch) | |
tree | 74492a42f48126a77646de9420baebc6c28041bf /win32 | |
parent | 04322328fc4bc2863d0bc74339ed92d33b7eaba7 (diff) | |
download | perl-1c1d7d5ba0bc33e7bea0a9aeb2d420fc5a8128ab.tar.gz |
Don't look for a "safe" memcpy()
C89 says that, if you want to copy overlapping memory blocks, you must use
memmove(), and that attempt to copy overlapping memory blocks using memcpy()
yields undefined behaviour. So we should never even attempt to probe for a
system memcpy() implementation that just happens to handle overlapping
memory blocks. In particular, the compiler might compile the probe program
in such a way that Configure thinks overlapping memcpy() works even when it
doesn't.
This has the additional advantage of removing a Configure probe that needs
to execute a target-platform program on the build host.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/config.ce | 1 | ||||
-rw-r--r-- | win32/config.gc | 1 | ||||
-rw-r--r-- | win32/config.vc | 1 | ||||
-rw-r--r-- | win32/config_H.ce | 8 | ||||
-rw-r--r-- | win32/config_H.gc | 8 | ||||
-rw-r--r-- | win32/config_H.vc | 8 |
6 files changed, 0 insertions, 27 deletions
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 |