summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-06-13 14:33:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-06-13 14:33:51 +0000
commitf72d1791dc00727a5f66df7ed9fa216194f48af8 (patch)
tree3f4b062470a511cab340db9e3366425785bbb07d /perl.h
parentaf28e88917ada915d1c6a69f2caccaada3cad842 (diff)
downloadperl-f72d1791dc00727a5f66df7ed9fa216194f48af8.tar.gz
Apparently the __APPLE__ cpp symbol is not Officially Sanctioned
way of detecting Darwin/Mac OS X; instead it is recommended to detect the OS at a higher level and pass the information manually down to the application, using e.g. a -Ddefinition. p4raw-id: //depot/perl@19764
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl.h b/perl.h
index 89c683c02f..70a88d8103 100644
--- a/perl.h
+++ b/perl.h
@@ -73,17 +73,18 @@
/* 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(NETWARE) && !defined(WIN32) && !defined(__APPLE__)
+#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(NETWARE) && !defined(WIN32) && !defined(DARWIN)
# define USE_REENTRANT_API
#endif
/* <--- here ends the logic shared by perl.h and makedef.pl */
/*
- * __APPLE__ for Darwin/MacOSX
+ * DARWIN for MacOSX (__APPLE__ exists but is not officially sanctioned)
+ * (The -DDARWIN comes from the hints/darwin.sh.)
* __bsdi__ for BSD/OS
*/
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__bsdi__) || defined(BSD41) || defined(BSD42) || defined(BSD43) || defined(BSD44)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(DARWIN) || defined(__bsdi__) || defined(BSD41) || defined(BSD42) || defined(BSD43) || defined(BSD44)
# ifndef BSDish
# define BSDish
# endif
@@ -2919,13 +2920,13 @@ typedef OP* (CPERLscope(*PPADDR_t)[]) (pTHX);
/* NeXT has problems with crt0.o globals */
#if defined(__DYNAMIC__) && \
- (defined(NeXT) || defined(__NeXT__) || defined(__APPLE__))
+ (defined(NeXT) || defined(__NeXT__) || defined(DARWIN))
# if defined(NeXT) || defined(__NeXT)
# include <mach-o/dyld.h>
# define environ (*environ_pointer)
EXT char *** environ_pointer;
# else
-# if defined(__APPLE__) && defined(PERL_CORE)
+# if defined(DARWIN) && defined(PERL_CORE)
# include <crt_externs.h> /* for the env array */
# define environ (*_NSGetEnviron())
# endif