Skip to content

Autotools: Replace uname with host_alias for finding Solaris #15770

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
Sep 6, 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
19 changes: 8 additions & 11 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1305,17 +1305,14 @@ dnl
dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
dnl component of the path has execute but not read permissions.
dnl
AC_DEFUN([PHP_BROKEN_GETCWD],[
AC_MSG_CHECKING([for broken getcwd])
os=$(uname -sr 2>/dev/null)
case $os in
SunOS*[)]
AC_DEFINE([HAVE_BROKEN_GETCWD], [1],
[Define to 1 if system has a broken 'getcwd'.])
AC_MSG_RESULT([yes]);;
*[)]
AC_MSG_RESULT([no]);;
esac
AC_DEFUN([PHP_BROKEN_GETCWD], [
AC_CACHE_CHECK([for broken getcwd], [php_cv_func_getcwd_broken],
[AS_CASE([$host_alias],
[*solaris*], [php_cv_func_getcwd_broken=yes],
[php_cv_func_getcwd_broken=no])])
AS_VAR_IF([php_cv_func_getcwd_broken], [yes],
[AC_DEFINE([HAVE_BROKEN_GETCWD], [1],
[Define to 1 if system has a broken 'getcwd'.])])
])

dnl
Expand Down
16 changes: 8 additions & 8 deletions sapi/cgi/config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ if test "$PHP_CGI" != "no"; then
dnl BSD systems.
AC_CHECK_MEMBERS([struct sockaddr_un.sun_len],,,[#include <sys/un.h>])

AC_MSG_CHECKING([whether cross-process locking is required by accept()])
AS_CASE([$(uname -sr)],
[SunOS\ 5.*], [
AC_MSG_RESULT([yes])
AC_DEFINE([USE_LOCKING], [1],
[Define to 1 if cross-process locking is required by 'accept()'.])
],
[AC_MSG_RESULT([no])])
AC_CACHE_CHECK([whether cross-process locking is required by accept()],
[php_cv_have_cross_process_locking],
[AS_CASE([$host_alias],
[*solaris*], [php_cv_have_cross_process_locking=yes],
[php_cv_have_cross_process_locking=no])])
AS_VAR_IF([php_cv_have_cross_process_locking], [yes],
[AC_DEFINE([USE_LOCKING], [1],
[Define to 1 if cross-process locking is required by 'accept()'.])])

PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/cgi/Makefile.frag])

Expand Down
Loading