$VERSION++ for all the non-dual life modules in ext/ that
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index aec1e26..b69baca 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4059,6 +4059,8 @@ struct perl_memory_debug_header {
        (MEM_ALIGNBYTES - sizeof(struct perl_memory_debug_header) \
         %MEM_ALIGNBYTES) % MEM_ALIGNBYTES)
 
+#else
+#  define sTHX 0
 #endif
 
 #ifdef PERL_TRACK_MEMPOOL
@@ -4071,11 +4073,25 @@ struct perl_memory_debug_header {
 #  define INIT_TRACK_MEMPOOL(header, interp)
 #endif
 
+#ifdef I_MALLOCMALLOC
+/* Needed for malloc_size(), malloc_good_size() on some systems */
+#  include <malloc/malloc.h>
+#endif
+
 #ifdef MYMALLOC
 #  define Perl_safesysmalloc_size(where)       Perl_malloced_size(where)
-#else if defined(HAS_MALLOC_SIZE)
-#  define Perl_safesysmalloc_size(where)                       \
-       (malloc_size(((char *)(where)) - sTHX) - sTHX)
+#else
+#   ifdef HAS_MALLOC_SIZE
+#      define Perl_safesysmalloc_size(where)                   \
+           (malloc_size(((char *)(where)) - sTHX) - sTHX)
+#   endif
+#   ifdef HAS_MALLOC_GOOD_SIZE
+#      define Perl_malloc_good_size(how_much)                  \
+           (malloc_good_size((how_much) + sTHX) - sTHX)
+#   else
+/* Having this as the identity operation makes some code simpler.  */
+#      define Perl_malloc_good_size(how_much)  (how_much)
+#   endif
 #endif
 
 typedef int (CPERLscope(*runops_proc_t)) (pTHX);
@@ -4638,7 +4654,7 @@ typedef regexp*(CPERLscope(*regdupe_t)) (pTHX_ const regexp* r, CLONE_PARAMS *pa
 typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*);
 typedef void (*DESTRUCTORFUNC_t) (pTHX_ void*);
 typedef void (*SVFUNC_t) (pTHX_ SV* const);
-typedef I32  (*SVCOMPARE_t) (pTHX_ SV*, SV*);
+typedef I32  (*SVCOMPARE_t) (pTHX_ SV* const, SV* const);
 typedef void (*XSINIT_t) (pTHX);
 typedef void (*ATEXIT_t) (pTHX_ void*);
 typedef void (*XSUBADDR_t) (pTHX_ CV *);