From: Artur Bergman Date: Tue, 5 Feb 2002 10:30:58 +0000 (+0000) Subject: Enable building with threads under macosx, assume __APPLE__ means darwin and disable... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f8ddd771cda27533f4680b572d765b063e03e11;p=p5sagit%2Fp5-mst-13.2.git Enable building with threads under macosx, assume __APPLE__ means darwin and disable _r functions, since we don't have them. p4raw-id: //depot/perl@14557 --- diff --git a/hints/darwin.sh b/hints/darwin.sh index d5e27a5..b0c317d 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -81,6 +81,9 @@ ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" # cppflags='-traditional-cpp'; # avoid Apple's cpp precompiler, better for extensions cppflags="${cppflags} -no-cpp-precomp" +# and ccflags needs them aswell since we don't use cpp directly +ccflags="${ccflags} -no-cpp-precomp" + # Shared library extension is .dylib. # Bundle extension is .bundle. @@ -133,9 +136,13 @@ case "$usethreads$useithreads$use5005threads" in *define*) cat <&4 -*** You do not have threadsafe libraries, I cannot use threads. -*** Cannot continue, aborting. +*** Warning, there might be problems with your libraries with +*** regards to threading. + EOM - exit 1 +#*** You do not have threadsafe libraries, I cannot use threads. +#*** Cannot continue, aborting. +#EOM +# exit 1 ;; esac diff --git a/perl.h b/perl.h index 4d9a94e..cc451b6 100644 --- a/perl.h +++ b/perl.h @@ -330,7 +330,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); /* Use the reentrant APIs like localtime_r and getpwent_r */ /* Win32 has naturally threadsafe libraries, no need to use any _r variants. */ -#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32) +#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(WIN32) && !defined(__APPLE__) # define USE_REENTRANT_API #endif