Further tiny bcopy cleanup
Andy Dougherty [Fri, 22 Jun 2001 14:29:51 +0000 (10:29 -0400)]
Message-ID: <Pine.SOL.4.10.10106221417030.28044-100000@maxwell.phys.lafayette.edu>

p4raw-id: //depot/perl@10831

Configure
Porting/Glossary
Porting/config.sh
Porting/config_H
config_h.SH
uconfig.h
vos/config.alpha.h
vos/config.ga.h

index e823dac..f09eba5 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Fri Jun 22 05:07:22 EET DST 2001 [metaconfig 3.0 PL70]
+# Generated on Fri Jun 22 23:55:12 EET DST 2001 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.org)
 
 cat >c1$$ <<EOF
@@ -11498,12 +11498,14 @@ set i_memory
 eval $setvar
 
 : can bcopy handle overlapping blocks?
+echo " "
 val="$undef"
-case "$d_bcopy" in
-"$define")
-       echo " "
-       echo "Checking to see if your bcopy() can do overlapping copies..." >&4
-       $cat >try.c <<EOCP
+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
@@ -11533,6 +11535,8 @@ 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--) {
@@ -11550,36 +11554,34 @@ for (align = 7; align >= 0; align--) {
 exit(0);
 }
 EOCP
-       set try
-       if eval $compile_ok; then
-               if $run ./try 2>/dev/null; then
-                       echo "Yes, it can."
-                       val="$define"
+               set try
+               if eval $compile_ok; then
+                       if ./try 2>/dev/null; then
+                               echo "Yes, it can."
+                               val="$define"
+                       else
+                               echo "It can't, sorry."
+                       fi
                else
-                       echo "It can't, sorry."
-                       case "$d_memmove" in
-                       "$define") echo "But that's Ok since you have memmove()." ;;
-                       esac
+                       echo "(I can't compile the test program, so we'll assume not...)"
                fi
-       else
-               echo "(I can't compile the test program, so we'll assume not...)"
-               case "$d_memmove" in
-               "$define") echo "But that's Ok since you have memmove()." ;;
-               esac
-       fi
+               ;;
+       esac
+       $rm -f try.* try core
        ;;
 esac
-$rm -f try.* try core
 set d_safebcpy
 eval $setvar
 
 : can memcpy handle overlapping blocks?
+echo " "
 val="$undef"
-case "$d_memcpy" in
-"$define")
-       echo " "
-       echo "Checking to see if your memcpy() can do overlapping copies..." >&4
-       $cat >try.c <<EOCP
+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
@@ -11628,26 +11630,22 @@ for (align = 7; align >= 0; align--) {
 exit(0);
 }
 EOCP
-       set try
-       if eval $compile_ok; then
-               if $run ./try 2>/dev/null; then
-                       echo "Yes, it can."
-                       val="$define"
+               set try
+               if eval $compile_ok; then
+                       if ./try 2>/dev/null; then
+                               echo "Yes, it can."
+                               val="$define"
+                       else
+                               echo "It can't, sorry."
+                       fi
                else
-                       echo "It can't, sorry."
-                       case "$d_memmove" in
-                       "$define") echo "But that's Ok since you have memmove()." ;;
-                       esac
+                       echo "(I can't compile the test program, so we'll assume not...)"
                fi
-       else
-               echo "(I can't compile the test program, so we'll assume not...)"
-               case "$d_memmove" in
-               "$define") echo "But that's Ok since you have memmove()." ;;
-               esac
-       fi
+               ;;
+       esac
+       $rm -f try.* try core
        ;;
 esac
-$rm -f try.* try core
 set d_safemcpy
 eval $setvar
 
index 136810b..8449a91 100644 (file)
@@ -1281,11 +1281,13 @@ d_rmdir (d_rmdir.U):
 
 d_safebcpy (d_safebcpy.U):
        This variable conditionally defines the HAS_SAFE_BCOPY symbol if
-       the bcopy() routine can do overlapping copies.
+       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
index b85b506..0ca0ec8 100644 (file)
@@ -8,7 +8,7 @@
 
 # Package name      : perl5
 # Source directory  : .
-# Configuration time: Thu Jun 21 23:32:02 EET DST 2001
+# Configuration time: Sat Jun 23 00:03:07 EET DST 2001
 # Configured by     : jhi
 # Target system     : osf1 alpha.hut.fi v4.0 878 alpha 
 
@@ -63,7 +63,7 @@ ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_
 ccversion='V5.6-082'
 cf_by='jhi'
 cf_email='yourname@yourhost.yourplace.com'
-cf_time='Thu Jun 21 23:32:02 EET DST 2001'
+cf_time='Sat Jun 23 00:03:07 EET DST 2001'
 charsize='1'
 chgrp=''
 chmod=''
@@ -292,7 +292,7 @@ d_recvmsg='define'
 d_rename='define'
 d_rewinddir='define'
 d_rmdir='define'
-d_safebcpy='define'
+d_safebcpy='undef'
 d_safemcpy='undef'
 d_sanemcmp='define'
 d_sbrkproto='define'
@@ -670,7 +670,7 @@ patchlevel='7'
 path_sep=':'
 perl5='/u/vieraat/vieraat/jhi/Perl/bin/perl'
 perl=''
-perl_patchlevel='10764'
+perl_patchlevel='10824'
 perladmin='yourname@yourhost.yourplace.com'
 perllibs='-lm -liconv -lutil -lpthread -lexc'
 perlpath='/opt/perl/bin/perl'
@@ -870,7 +870,7 @@ PERL_SUBVERSION=1
 PERL_API_REVISION=5
 PERL_API_VERSION=5
 PERL_API_SUBVERSION=0
-PERL_PATCHLEVEL=10764
+PERL_PATCHLEVEL=10824
 PERL_CONFIG_SH=true
 # Variables propagated from previous config.sh file.
 pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"'
index 235021c..3c14554 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * Package name      : perl5
  * Source directory  : .
- * Configuration time: Thu Jun 21 23:32:02 EET DST 2001
+ * Configuration time: Sat Jun 23 00:03:07 EET DST 2001
  * Configured by     : jhi
  * Target system     : osf1 alpha.hut.fi v4.0 878 alpha 
  */
 
 /* HAS_SAFE_BCOPY:
  *     This symbol, if defined, indicates that the bcopy routine is available
- *     to copy potentially overlapping memory blocks. Otherwise you should
+ *     to copy potentially overlapping memory blocks. Normally, you should
  *     probably use memmove() or memcpy(). If neither is defined, roll your
  *     own version.
  */
-#define HAS_SAFE_BCOPY /**/
+/*#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.
+ *     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      / **/
 
index de04804..06325c0 100644 (file)
@@ -1852,7 +1852,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
 
 /* HAS_SAFE_BCOPY:
  *     This symbol, if defined, indicates that the bcopy routine is available
- *     to copy potentially overlapping memory blocks. Otherwise you should
+ *     to copy potentially overlapping memory blocks. Normally, you should
  *     probably use memmove() or memcpy(). If neither is defined, roll your
  *     own version.
  */
@@ -1860,9 +1860,9 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
 
 /* 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.
+ *     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   /**/
 
index 8c862f1..28beb65 100644 (file)
--- a/uconfig.h
+++ b/uconfig.h
 
 /* HAS_SAFE_BCOPY:
  *     This symbol, if defined, indicates that the bcopy routine is available
- *     to copy potentially overlapping memory blocks. Otherwise you should
+ *     to copy potentially overlapping memory blocks. Normally, you should
  *     probably use memmove() or memcpy(). If neither is defined, roll your
  *     own version.
  */
 
 /* 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.
+ *     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      / **/
 
index 72a0e3d..e62bec2 100644 (file)
 
 /* HAS_SAFE_BCOPY:
  *     This symbol, if defined, indicates that the bcopy routine is available
- *     to copy potentially overlapping memory blocks. Otherwise you should
+ *     to copy potentially overlapping memory blocks. Normally, you should
  *     probably use memmove() or memcpy(). If neither is defined, roll your
  *     own version.
  */
 
 /* 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.
+ *     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      /**/
 
index 6cc7db0..7529d70 100644 (file)
 
 /* HAS_SAFE_BCOPY:
  *     This symbol, if defined, indicates that the bcopy routine is available
- *     to copy potentially overlapping memory blocks. Otherwise you should
+ *     to copy potentially overlapping memory blocks. Normally, you should
  *     probably use memmove() or memcpy(). If neither is defined, roll your
  *     own version.
  */
 
 /* 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.
+ *     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      /**/