Skip to content

Remove DARWIN symbol #13346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
- Removed checking and linking with obsolete libbind for some functions.
- Symbol HAVE_JSON has been removed (ext/json is always available since PHP
8.0).
- Symbol DARWIN has been removed (use __APPLE__ to target Darwin systems).

c. Windows build system changes
- Added Bison flag '-Wall' when generating lexer files as done in *nix build
Expand Down
8 changes: 0 additions & 8 deletions Zend/Zend.m4
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,6 @@ fi

AC_C_INLINE

AC_MSG_CHECKING(target system is Darwin)
if echo "$target" | grep "darwin" > /dev/null; then
AC_DEFINE([DARWIN], 1, [Define if the target system is darwin])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi

dnl Test and set the alignment define for ZEND_MM. This also does the
dnl logarithmic test for ZEND_MM.
AC_MSG_CHECKING(for MM alignment and log values)
Expand Down
6 changes: 3 additions & 3 deletions Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ char *alloca();
# endif
#endif

#if !ZEND_DEBUG && (defined(HAVE_ALLOCA) || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
#if !ZEND_DEBUG && (defined(HAVE_ALLOCA) || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(HPUX)) && !defined(__APPLE__)
# define ZEND_ALLOCA_MAX_SIZE (32 * 1024)
# define ALLOCA_FLAG(name) \
bool name;
Expand Down Expand Up @@ -305,7 +305,7 @@ char *alloca();
# define ZEND_FASTCALL
#endif

#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
# define HAVE_NORETURN
# define ZEND_NORETURN __attribute__((noreturn))
#elif defined(ZEND_WIN32)
Expand All @@ -321,7 +321,7 @@ char *alloca();
# define ZEND_STACK_ALIGNED
#endif

#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__))
#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__))
# define HAVE_NORETURN_ALIAS
# define HAVE_ATTRIBUTE_WEAK
#endif
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#undef T_UNSPEC
#endif
#ifdef HAVE_ARPA_NAMESER_H
#ifdef DARWIN
#ifdef __APPLE__
# define BIND_8_COMPAT 1
#endif
#include <arpa/nameser.h>
Expand Down
10 changes: 5 additions & 5 deletions sapi/cli/ps_title.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extern char** environ;
#include <machine/vmparam.h> /* for old BSD */
#include <sys/exec.h>
#endif
#if defined(DARWIN)
#if defined(__APPLE__)
#include <crt_externs.h>
#endif

Expand Down Expand Up @@ -91,9 +91,9 @@ extern char** environ;
#define PS_USE_PSTAT
#elif defined(HAVE_PS_STRINGS)
#define PS_USE_PS_STRINGS
#elif defined(BSD) && !defined(DARWIN)
#elif defined(BSD) && !defined(__APPLE__)
#define PS_USE_CHANGE_ARGV
#elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__osf__) || defined(DARWIN)
#elif defined(__linux__) || defined(_AIX) || defined(__sgi) || (defined(sun) && !defined(BSD)) || defined(ultrix) || defined(__osf__) || defined(__APPLE__)
#define PS_USE_CLOBBER_ARGV
#elif defined(PHP_WIN32)
#define PS_USE_WIN32
Expand All @@ -102,7 +102,7 @@ extern char** environ;
#endif

/* Different systems want the buffer padded differently */
#if defined(_AIX) || defined(__linux__) || defined(DARWIN)
#if defined(_AIX) || defined(__linux__) || defined(__APPLE__)
#define PS_PADDING '\0'
#else
#define PS_PADDING ' '
Expand Down Expand Up @@ -235,7 +235,7 @@ char** save_ps_args(int argc, char** argv)
}
new_argv[argc] = NULL;

#if defined(DARWIN)
#if defined(__APPLE__)
/*
* Darwin (and perhaps other NeXT-derived platforms?) has a static
* copy of the argv pointer, which we may fix like so:
Expand Down