Fix bug #77361 (configure fails on 64-bit AIX when opcache enabled) #3723
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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.