Don't attempt to use non-standard <memory.h>
authorAaron Crane <arc@cpan.org>
Sat, 14 Oct 2017 14:10:31 +0000 (16:10 +0200)
committerAaron Crane <arc@cpan.org>
Sat, 21 Oct 2017 15:53:21 +0000 (16:53 +0100)
It's only needed on systems without C89 <string.h>, which we rely on anyway.

25 files changed:
Configure
Cross/config.sh-arm-linux
Cross/config.sh-arm-linux-n770
NetWare/config.wc
NetWare/config_H.wc
Porting/Glossary
Porting/config.sh
Porting/config_H
config_h.SH
configure.com
ext/SDBM_File/sdbm.h
perl.h
plan9/config.plan9
plan9/config_h.sample
plan9/config_sh.sample
symbian/config.sh
uconfig.h
uconfig.sh
uconfig64.sh
win32/config.ce
win32/config.gc
win32/config.vc
win32/config_H.ce
win32/config_H.gc
win32/config_H.vc

index 14495ed..4a52232 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -991,7 +991,6 @@ i_locale=''
 i_machcthr=''
 i_malloc=''
 i_mallocmalloc=''
-i_memory=''
 i_mntent=''
 d_gdbm_ndbm_h_uses_prototypes=''
 d_gdbmndbm_h_uses_prototypes=''
@@ -22659,30 +22658,6 @@ else
        i_machcthr="$undef"
 fi
 
-: see if memory.h is available.
-val=''
-set memory.h val
-eval $inhdr
-
-: See if it conflicts with string.h
-case "$val" in
-$define)
-       case "$strings" in
-       '') ;;
-       *)
-               $cppstdin $cppflags $cppminus < $strings > mem.h
-               if $contains 'memcpy' mem.h >/dev/null 2>&1; then
-                       echo " "
-                       echo "We won't be including <memory.h>."
-                       val="$undef"
-               fi
-               $rm -f mem.h
-               ;;
-       esac
-esac
-set i_memory
-eval $setvar
-
 : see if this is a mntent.h system
 set mntent.h i_mntent
 eval $inhdr
@@ -24428,7 +24403,6 @@ i_locale='$i_locale'
 i_machcthr='$i_machcthr'
 i_malloc='$i_malloc'
 i_mallocmalloc='$i_mallocmalloc'
-i_memory='$i_memory'
 i_mntent='$i_mntent'
 i_ndbm='$i_ndbm'
 i_netdb='$i_netdb'
index feaeb8a..33083bc 100644 (file)
@@ -749,7 +749,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='define'
 i_ndbm='undef'
 i_netdb='define'
index d0befda..a7f3849 100644 (file)
@@ -610,7 +610,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='define'
 i_ndbm='undef'
 i_netdb='define'
index d98ed36..660dd9c 100644 (file)
@@ -731,7 +731,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='define'
index 37b1d26..a369f6e 100644 (file)
  */
 #define        I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             /**/
-
 /* I_NDBM:
  *     This symbol, if defined, indicates that <ndbm.h> exists and should
  *     be included.
index f6d72c5..03156f0 100644 (file)
@@ -3489,10 +3489,6 @@ i_mallocmalloc (i_mallocmalloc.U):
        This variable conditionally defines the I_MALLOCMALLOC symbol,
        and indicates whether a C program should include <malloc/malloc.h>.
 
-i_memory (i_memory.U):
-       This variable conditionally defines the I_MEMORY symbol, and indicates
-       whether a C program should include <memory.h>.
-
 i_mntent (i_mntent.U):
        This variable conditionally defines the I_MNTENT symbol, and indicates
        whether a C program should include <mntent.h>.
index 9a4e069..1cc8d53 100644 (file)
@@ -767,7 +767,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='undef'
 i_mallocmalloc='define'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='define'
 i_netdb='define'
index b56dd60..8749cee 100644 (file)
  */
 #define        I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             / **/
-
 /* I_NETINET_IN:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
index ce046ed..00f2458 100755 (executable)
@@ -673,12 +673,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
  */
 #$i_locale     I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-#$i_memory I_MEMORY            /**/
-
 /* I_NETINET_IN:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
index 8b1106f..5f354aa 100644 (file)
@@ -6556,7 +6556,6 @@ $ WC "i_machcthr='undef'"
 $ WC "i_machcthreads='undef'"
 $ WC "i_malloc='undef'"
 $ WC "i_mallocmalloc='undef'"
-$ WC "i_memory='undef'"
 $ WC "i_mntent='undef'"
 $ WC "i_ndbm='undef'"
 $ WC "i_netdb='" + i_netdb + "'"
index ba001cf..085aace 100644 (file)
@@ -186,10 +186,6 @@ Free_t   Perl_mfree(Malloc_t where);
 # include <strings.h>
 #endif
 
-#ifdef I_MEMORY
-#include <memory.h>
-#endif      
-
 #define memzero(d,l) memset(d,0,l)
 
 #ifdef BUGGY_MSC
diff --git a/perl.h b/perl.h
index 2b4c324..4072bd2 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -959,10 +959,6 @@ EXTERN_C int usleep(unsigned int);
 #define MALLOC_TOO_LATE_FOR(ch)        TOO_LATE_FOR_(ch, " with $ENV{PERL_MALLOC_OPT}")
 #define MALLOC_CHECK_TAINT2(argc,argv) MALLOC_CHECK_TAINT(argc,argv,NULL)
 
-#ifdef I_MEMORY
-#  include <memory.h>
-#endif
-
 #ifndef memzero
 #   define memzero(d,l) memset(d,0,l)
 #endif
index b75842f..101ad92 100644 (file)
  */
 #define        I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             / **/
-
 /* I_NET_ERRNO:
  *     This symbol, if defined, indicates that <net/errno.h> exists and 
  *     should be included.
index 2e0b764..2a31593 100644 (file)
  */
 #define        I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             / **/
-
 /* I_NET_ERRNO:
  *     This symbol, if defined, indicates that <net/errno.h> exists and 
  *     should be included.
index 538e397..26d8666 100644 (file)
@@ -743,7 +743,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='undef'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='define'
index eb5b16f..e5fd1e3 100644 (file)
@@ -671,7 +671,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='undef'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='define'
index b028c97..77187c9 100644 (file)
--- a/uconfig.h
+++ b/uconfig.h
  */
 /*#define      I_LOCALE                / **/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             / **/
-
 /* I_NETINET_IN:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
 #endif
 
 /* Generated from:
- * 19dc934d2543aae24f9cd7a20aa97f4f6fa9a3680e4cb3c24d5c9920f0f8fd31 config_h.SH
- * fa19c21ba6517cbd4de934e966302bd2e3b9c12a3f0b293f005feb16eb5fc8f6 uconfig.sh
+ * 7d20869bdf5823fce14e1728a7c415917f7e1fcddf5df6f6b4b16a1a9e2cc6cb config_h.SH
+ * 0840ae8893cc31a34607870782c78181109e94dfaedff874545a5b2227501892 uconfig.sh
  * ex: set ro: */
index a591e8f..d23dfab 100644 (file)
@@ -657,7 +657,6 @@ i_locale='undef'
 i_machcthr='undef'
 i_malloc='undef'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='undef'
index bfa0140..60c49b1 100644 (file)
@@ -657,7 +657,6 @@ i_locale='undef'
 i_machcthr='undef'
 i_malloc='undef'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='undef'
index d7d9502..7349691 100644 (file)
@@ -727,7 +727,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='undef'
index 02c9e3b..5baf5fe 100644 (file)
@@ -741,7 +741,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='undef'
index 1dd71ac..ef7f652 100644 (file)
@@ -738,7 +738,6 @@ i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
-i_memory='undef'
 i_mntent='undef'
 i_ndbm='undef'
 i_netdb='undef'
index 26f0cb8..f4a1e12 100644 (file)
  */
 /*#define      I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             /**/
-
 /* I_NET_ERRNO:
  *     This symbol, if defined, indicates that <net/errno.h> exists and
  *     should be included.
index da273a2..9bd3db7 100644 (file)
  */
 #define        I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             / **/
-
 /* I_NETINET_IN:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <netinet/in.h>. Otherwise, you may try <sys/in.h>.
index 9d55dfe..f4bb807 100644 (file)
  */
 #define        I_LOCALE                /**/
 
-/* I_MEMORY:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <memory.h>.
- */
-/*#define I_MEMORY             / **/
-
 /* I_NETINET_IN:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <netinet/in.h>. Otherwise, you may try <sys/in.h>.