Skip to content

Conversation

petk
Copy link
Member

@petk petk commented Jun 13, 2024

AC_CHECK_DECLS defines HAVE_DECL_ARC4RANDOM_BUF to 0 or 1. On Windows this isn't defined to 0. To avoid the undefined state, the AC_CHECK_DECL is used to manually define the HAVE_ARC4RANDOM_BUF to 1 if declaration is found, otherwise undefined.

In the future on current platforms, also AC_CHECK_FUNCS can be used instead since the arc4random_buf is located in default libraries (C) with declaration available in headers.

AC_CHECK_DECLS defines HAVE_DECL_ARC4RANDOM_BUF to 0 or 1. On Windows
this isn't defined to 0. To avoid the undefined state, the AC_CHECK_DECL
is used to manually define the HAVE_ARC4RANDOM_BUF to 1 if declaration
is found, otherwise undefined.

In the future on current platforms, also AC_CHECK_FUNCS can be used
instead since the arc4random_buf is located in default libraries (C)
with declaration available in headers.
@petk petk merged commit 3b951e7 into php:master Jun 13, 2024
@petk petk deleted the patch-HAVE_DECL_ARC4RANDOM_BUF branch June 13, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants