Skip to content

Conversation

@kadler
Copy link
Contributor

@kadler kadler commented Dec 28, 2018

In f904830, support for GNU Hurd was added to the opcache and the configure check to ensure the opcache knows the flock struct layout prior to building was changed to check for two cases: BSD layout and Linux layout. All the existing hard-coded cases in ZendAccelerator.h follow these two cases, except for 64-bit AIX. This means that even though building on 64-bit AIX would work, the configure script refuses to continue.

Add a new configure check for the 64-bit AIX case and a new compiler definition HAVE_FLOCK_AIX64. Now that all the cases are covered, simplify the ifdef logic around these three HAVE_FLOCK_* macros:

  • The macOS and the various BSD flavors fall under HAVE_FLOCK_BSD
  • Linux, HP-UX, GNU Hurd, 32-bit AIX, and SVR4 environments fall under HAVE_FLOCK_LINUX
  • 64-bit AIX falls under HAVE_FLOCK_AIX64

The only difference between the existing HAVE_FLOCK_LINUX and the hard-coded Linux/HP-UX/Hurd case is that the latter initialized the 5th member to 0, but since the C standard already says that un-initialized members will be initialized to 0, it's effectively the same.

@petk petk added the Bug label Dec 28, 2018
@cmb69
Copy link
Member

cmb69 commented Dec 28, 2018

Seem that @nikic was right about this breakage.

In f904830, support for GNU Hurd was added to the opcache and
the configure check to ensure the opcache knows the flock struct
layout prior to building was changed check for two cases: BSD layout
and Linux layout. All the existing hard-coded cases in
ZendAccelerator.h follow these two cases, except for 64-bit AIX.
This means that even though building on 64-bit AIX would work,
the configure script refuses to continue.

Add a new configure check for the 64-bit AIX case and a new
compiler definition HAVE_FLOCK_AIX64. Now that all the cases are
covered, simplify the ifdef logic around these three HAVE_FLOCK_*
macros:
- The macOS and the various BSD flavors fall under HAVE_FLOCK_BSD
- Linux, HP-UX, GNU Hurd, 32-bit AIX, and SVR4 environments
  fall under HAVE_FLOCK_LINUX
- 64-bit AIX falls under HAVE_FLOCK_AIX64

The only difference between the existing HAVE_FLOCK_LINUX and
the hard-coded Linux/HP-UX/Hurd case is that the latter
initialized the 5th member to 0, but since the C standard already
says that un-initialized members will be initialized to 0,
it's effectively the same.
@nikic
Copy link
Member

nikic commented Jan 11, 2019

Merged as 332b58f into 7.2+. Thanks!

@nikic nikic closed this Jan 11, 2019
@kadler kadler deleted the aix_opcache_fix branch January 11, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants