Commit b8de7bf6 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Use both __APPLE__ and __DARWIN__ defines

Imake unsets __APPLE__ and sets __DARWIN__ instead while autoconf seems to use __APPLE__ and not __DARWIN__ anymore. This way we should stay safe for now. Can be changed to __APPLE__ when we switch to modular.
parent 01865335
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
# define INTERNAL # define INTERNAL
# endif # endif
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) || defined(__DARWIN__)
# undef HAVE_ALIAS # undef HAVE_ALIAS
#endif #endif
#ifdef HAVE_ALIAS #ifdef HAVE_ALIAS
......
...@@ -257,7 +257,7 @@ typedef struct { ...@@ -257,7 +257,7 @@ typedef struct {
*/ */
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
defined(__APPLE__) || defined(__DragonFly__) defined(__APPLE__) || defined(__DARWIN__) || defined(__DragonFly__)
static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
{ {
memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); memcpy(&(p).pws, (p).pwp, sizeof(struct passwd));
...@@ -327,7 +327,7 @@ static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) ...@@ -327,7 +327,7 @@ static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
(_Xos_processUnlock), \ (_Xos_processUnlock), \
(p).pwp ) (p).pwp )
#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) && !defined(__DARWIN__)
/* SVR4 threads, AIX 4.2.0 and earlier and OSF/1 3.2 and earlier pthreads */ /* SVR4 threads, AIX 4.2.0 and earlier and OSF/1 3.2 and earlier pthreads */
# define X_NEEDS_PWPARAMS # define X_NEEDS_PWPARAMS
typedef struct { typedef struct {
...@@ -620,7 +620,7 @@ typedef struct { ...@@ -620,7 +620,7 @@ typedef struct {
} _Xreaddirparams; } _Xreaddirparams;
# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(AIXV3) || \ # if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(AIXV3) || \
defined(AIXV4) || defined(__APPLE__) defined(AIXV4) || defined(__APPLE__) || defined(__DARWIN__)
/* AIX defines the draft POSIX symbol, but uses the final API. */ /* AIX defines the draft POSIX symbol, but uses the final API. */
/* POSIX final API, returns (int)0 on success. */ /* POSIX final API, returns (int)0 on success. */
# if defined(__osf__) # if defined(__osf__)
......
...@@ -118,7 +118,7 @@ _Xsetlocale( ...@@ -118,7 +118,7 @@ _Xsetlocale(
#else /* X_LOCALE */ #else /* X_LOCALE */
#if defined(__APPLE__) || defined(__CYGWIN__) #if defined(__DARWIN__) || defined(__APPLE__) || defined(__CYGWIN__)
char * char *
_Xsetlocale( _Xsetlocale(
int category, int category,
...@@ -127,7 +127,7 @@ _Xsetlocale( ...@@ -127,7 +127,7 @@ _Xsetlocale(
{ {
return setlocale(category, name); return setlocale(category, name);
} }
#endif /* __APPLE__ || __CYGWIN__ */ #endif /* __DARWIN__ || __APPLE__ || __CYGWIN__ */
/* /*
* _XlcMapOSLocaleName is an implementation dependent routine that derives * _XlcMapOSLocaleName is an implementation dependent routine that derives
......
...@@ -238,7 +238,7 @@ _Xsetlocale( ...@@ -238,7 +238,7 @@ _Xsetlocale(
int category, int category,
_Xconst char *name); _Xconst char *name);
#else #else
#ifdef __APPLE__ #if defined(__APPLE__) || defined(__DARWIN__)
extern char * extern char *
_Xsetlocale( _Xsetlocale(
int category, int category,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment