summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-12 14:00:03 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:51:36 +0100
commit1eb06a387814d96975ac806b89805b1e28e8080d (patch)
treef4b8fab42d7009f9196a7cd4233b9ec42158262e /Configure
parent1c1d7d5ba0bc33e7bea0a9aeb2d420fc5a8128ab (diff)
downloadperl-1eb06a387814d96975ac806b89805b1e28e8080d.tar.gz
Assume we have C89 memcpy() and memmove()
We can therefore also avoid probing for and/or using BSD bcopy().
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure96
1 files changed, 0 insertions, 96 deletions
diff --git a/Configure b/Configure
index 6739e8babb..66df8a8f19 100755
--- a/Configure
+++ b/Configure
@@ -392,7 +392,6 @@ d_attribute_warn_unused_result=''
d_printf_format_null=''
d_backtrace=''
d_bcmp=''
-d_bcopy=''
d_builtin_choose_expr=''
d_builtin_expect=''
d_builtin_add_overflow=''
@@ -666,9 +665,7 @@ d_mbstowcs=''
d_mbtowc=''
d_memchr=''
d_memcmp=''
-d_memcpy=''
d_memmem=''
-d_memmove=''
d_memrchr=''
d_mkdir=''
d_mkdtemp=''
@@ -746,7 +743,6 @@ d_rename=''
d_rint=''
d_rmdir=''
d_round=''
-d_safebcpy=''
d_sanemcmp=''
d_sbrkproto=''
d_scalbn=''
@@ -11369,10 +11365,6 @@ $rm -f attrib*
set bcmp d_bcmp
eval $inlibc
-: see if bcopy exists
-set bcopy d_bcopy
-eval $inlibc
-
: see if getpgrp exists
set getpgrp d_getpgrp
eval $inlibc
@@ -16627,18 +16619,10 @@ eval $inlibc
set memcmp d_memcmp
eval $inlibc
-: see if memcpy exists
-set memcpy d_memcpy
-eval $inlibc
-
: see if memmem exists
set memmem d_memmem
eval $inlibc
-: see if memmove exists
-set memmove d_memmove
-eval $inlibc
-
: see if memrchr exists
set memrchr d_memrchr
eval $inlibc
@@ -17913,82 +17897,6 @@ esac
set i_memory
eval $setvar
-: can bcopy handle overlapping blocks?
-echo " "
-val="$undef"
-case "$d_memmove" in
-"$define") echo "I'll use memmove() instead of bcopy() for overlapping copies." ;;
-*) case "$d_bcopy" in
- "$define")
- echo "Checking to see if bcopy() 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. */
-bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
-
-for (align = 7; align >= 0; align--) {
- for (len = 36; len; len--) {
- b = buf+align;
- bcopy(abc, b, len);
- for (off = 1; off <= len; off++) {
- bcopy(b, b+off, len);
- bcopy(b+off, b, len);
- if (bcmp(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_safebcpy
-eval $setvar
-
: can memcmp be trusted to compare relative magnitude?
val="$undef"
case "$d_memcmp" in
@@ -24605,7 +24513,6 @@ d_attribute_unused='$d_attribute_unused'
d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
d_backtrace='$d_backtrace'
d_bcmp='$d_bcmp'
-d_bcopy='$d_bcopy'
d_bsd='$d_bsd'
d_bsdgetpgrp='$d_bsdgetpgrp'
d_bsdsetpgrp='$d_bsdsetpgrp'
@@ -24863,9 +24770,7 @@ d_mbstowcs='$d_mbstowcs'
d_mbtowc='$d_mbtowc'
d_memchr='$d_memchr'
d_memcmp='$d_memcmp'
-d_memcpy='$d_memcpy'
d_memmem='$d_memmem'
-d_memmove='$d_memmove'
d_memrchr='$d_memrchr'
d_mkdir='$d_mkdir'
d_mkdtemp='$d_mkdtemp'
@@ -24955,7 +24860,6 @@ d_rewinddir='$d_rewinddir'
d_rint='$d_rint'
d_rmdir='$d_rmdir'
d_round='$d_round'
-d_safebcpy='$d_safebcpy'
d_sanemcmp='$d_sanemcmp'
d_sbrkproto='$d_sbrkproto'
d_scalbn='$d_scalbn'