Re: [PATCH] Re: Not OK: perl 5.00553 on OPENSTEP-Mach 4_1
Hans Mulder [Sun, 8 Nov 1998 22:20:23 +0000 (23:20 +0100)]
To: Ilya Zakharevich <ilya@math.ohio-state.edu>
Cc: gsar@engin.umich.edu (Gurusamy Sarathy), jhi@iki.fi,
        perl5-porters@perl.org
(UNINSTALLED)
Message-Id: <9811082119.AA11802@icgned.icgroup.nl>

p4raw-id: //depot/cfgperl@2225

malloc.c
perl.h

index 5d795e4..79122fd 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -571,10 +571,10 @@ static char bucket_of[] =
 #  endif 
 
 #ifdef I_MACH_CTHREADS
-#undef MUTEX_LOCK
-#define MUTEX_LOCK(m)  STMT_START { if (*m) mutex_lock(*m); } STMT_END
-#undef MUTEX_UNLOCK
-#define MUTEX_UNLOCK(m)        STMT_START { if (*m) mutex_unlock(*m); } STMT_END
+#  undef  MUTEX_LOCK
+#  define MUTEX_LOCK(m)   STMT_START { if (*m) mutex_lock(*m);   } STMT_END
+#  undef  MUTEX_UNLOCK
+#  define MUTEX_UNLOCK(m) STMT_START { if (*m) mutex_unlock(*m); } STMT_END
 #endif
 
 static char *emergency_buffer;
diff --git a/perl.h b/perl.h
index ba898c4..825f304 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1372,6 +1372,9 @@ typedef I32 (*filter_t) _((int, SV *, int));
 #      else
 #        ifdef I_MACH_CTHREADS
 #          include <mach/cthreads.h>
+#          ifdef NeXT
+#            define MUTEX_INIT_CALLS_MALLOC
+#          endif
 typedef cthread_t      perl_os_thread;
 typedef mutex_t                perl_mutex;
 typedef condition_t    perl_cond;
@@ -1816,7 +1819,7 @@ typedef Sighandler_t Sigsave_t;
 #endif
 
 #ifdef MYMALLOC
-#  ifdef I_MACH_CTHREADS
+#  ifdef MUTEX_INIT_CALLS_MALLOC
 #    define MALLOC_INIT                                        \
        STMT_START {                                    \
                PL_malloc_mutex = NULL;                 \