Skip to content

Use AC_CHECK_TYPES for checking struct flock #13397

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 15, 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 @@ -68,6 +68,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
- Symbol HAVE_BSD_ICONV has been removed.
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
- M4 macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH).
- M4 macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES).

c. Windows build system changes
- The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19 have
Expand Down
19 changes: 0 additions & 19 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1242,25 +1242,6 @@ AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
AC_MSG_RESULT([done])
])

dnl
dnl PHP_STRUCT_FLOCK
dnl
AC_DEFUN([PHP_STRUCT_FLOCK],[
AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h>
#include <fcntl.h>
]], [[struct flock x;]])],[
ac_cv_struct_flock=yes
],[
ac_cv_struct_flock=no
])
)
if test "$ac_cv_struct_flock" = "yes" ; then
AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
fi
])

dnl
dnl PHP_SOCKADDR_CHECKS
dnl
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ dnl ----------------------------------------------------------------------------
AC_STRUCT_TIMEZONE

PHP_MISSING_TIME_R_DECL
PHP_STRUCT_FLOCK

AC_CHECK_TYPES([struct flock],,,[#include <fcntl.h>])
AC_CHECK_TYPES(socklen_t, [], [], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
Expand Down